You can also do @post.attributes = params[:post]. It updates the attributes without saving them to the database.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Best way to update attributes on AR objects without saving? | 0 | 127 | January 20, 2007 | |
Can you update a db record without first retrieving it? | 0 | 130 | March 11, 2009 | |
update_attributes, want to add not replace? | 0 | 107 | June 17, 2007 | |
How to update partial attributes of a object from a form? | 0 | 112 | December 8, 2006 | |
update_attributes save only if columns changed? | 1 | 237 | October 2, 2015 |