search for: photo_param

Displaying 1 result from an estimated 1 matches for "photo_param".

Did you mean: photo_params
2005 Dec 27
4
How do you detect if ActiveRecord ''update'' fails?
So I''m updating multiple model objects in one go with something like this in my controller: => Photo.update(params[:photo].keys, params[:photo].values) When the update fails due to validation errors, how do I detect it? The Rails API says: "If the save fails under validations, the unsaved object is still returned." So I can''t simply do this: => if