Rails: #update_attribute vs #update_attributes

obj.update_attribute(:only_one_field, ‘Some Value’) obj.update_attributes(field1: ‘value’, field2: ‘value2’, field3: ‘value3’) Both of these will update an object without having to explicitly tell ActiveRecord to update. Rails API says: update_attribute Updates a single attribute and saves the record without going through the normal validation procedure. This is especially useful for boolean flags on existing records. The regular … Read more