Rails - Update attributes of a record
There are many ways to update
an attributes of a record in Rails.
update_attributes
: Full options, with validate, run callback, updateupdated_at
fieldupdate_attribute
: Without validate for updated field, run callback, updateupdated_at
fieldupdate_columns
: Update to DB, without validates, not run callback, not updatedupdated_at
fieldupdate_column
: Likeupdated_columns
but it updatesupdated_at
field.update_all
: Update all record in a table without validations, callbacks,updated_at
field