Displaying 1 result from an estimated 1 matches for "validation_on_upd".
2008 Feb 03
1
ActiveRecord object.valid? triggers unexepected results
...m editing an ActiveRecord object in a session through AJAX, updating
it with object.attributes = params[:object], and validating it with
object.valid?
Because it''s associated with other objects in a form, I want to save
them all together.
The surprise was that object.valid? triggers after_validation_on_update.
I''m having an audit log and I was getting bogus entries.
http://api.rubyonrails.org/classes/ActiveRecord/Validations.html#M001316
valid?()
Runs validate and validate_on_create or validate_on_update and returns
true if no errors were added otherwise false.
valid?() should run all vali...