Search⌘ K

Challenge Solution: Validate Updates

Understand how to implement validation in the update action within a Ruby on Rails controller. Learn to handle successful updates versus errors by controlling flow and rendering views appropriately. This lesson helps you manage update validations effectively in CRUD operations.

Solution

//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css

Explanation

app/controllers/pets_controller.rb

Lines 27–34: ...