module ActiveRecord::Persistence
Public Instance Methods
update_if_changed(attributes)
click to toggle source
# File lib/update_if_changed.rb, line 3 def update_if_changed(attributes) self.assign_attributes(attributes) self.update(attributes) if self.changed? end