Method: Audited::Audit#new_attributes
- Defined in:
- lib/audited/audit.rb
#new_attributes ⇒ Object
Returns a hash of the changed attributes with the new values
83 84 85 86 87 |
# File 'lib/audited/audit.rb', line 83 def new_attributes (audited_changes || {}).each_with_object({}.with_indifferent_access) do |(attr, values), attrs| attrs[attr] = (action == "update") ? values.last : values end end |