Is there a replacement for update_attribute
? I know you can still use it in Rails 3 but you get deprecation messages.
The reason why I need to use update_attribute
is because I need to skip validations but run callbacks.
The only way that I've found of doing this (and avoid deprecation messages), is by simply extracting the code from update_attribute
:
Object.send("#{attribute}=", value)
Object.save(:validate => false)
I'd like to know if there is another (proper) way of doing this.
Thanks.