Ben Johnson
2006-Aug-15 16:54 UTC
[Rails] Update attribute without validations or any save hooks?
If I wanted to update an attribute with calling any validation or any of the before_save and after_save hooks, how would I go about doing this? Supposed the update_attribute method calls the before and after save methods. Thanks for your help. -- Posted via http://www.ruby-forum.com/.
Alex Wayne
2006-Aug-15 17:19 UTC
[Rails] Re: Update attribute without validations or any save hooks?
Ben Johnson wrote:> If I wanted to update an attribute with calling any validation or any of > the before_save and after_save hooks, how would I go about doing this? > > Supposed the update_attribute method calls the before and after save > methods. > > Thanks for your help.I am not sure about skipping before and after save methods, but you can skip validation by passing true to the save method @foo.save(true) #skips validations -- Posted via http://www.ruby-forum.com/.