Displaying 1 result from an estimated 1 matches for "invalidemail".
2011 May 21
1
Consequences of overriding update_attribute to force validation?
...te_attribute:
1) Does not ever validate the object, causing a massive hole in your
validation schemes. For instance, if a validation depends on anything
you update with update_attribute, that validation will not work.
2) Updates ALL fields if the object has been modified. @user.email =
''invalidemail''; @user.update_attribute(:state, ''registered''); will
always put an invalid email in your database.
3) Saves the object regardless of whether it''s been persisted. E.g.
User.new.update_attribute(:state, ''registered'') will always save a new
user o...