Method: StandardModel#save_and_log!
- Defined in:
- lib/app/models/concerns/standard_model.rb
#save_and_log!(user, options = {}) ⇒ Object
Record an save
287 288 289 290 291 292 293 294 295 |
# File 'lib/app/models/concerns/standard_model.rb', line 287 def save_and_log!(user, = {}) self.created_by = user if new_record? self.last_modified_by = user model_changes = changes action = audit_action result = save!() log_change(user, model_changes, action) result end |