method
changes
v5.0.0.1 -
Show latest stable
- Class:
ActiveRecord::AttributeMutationTracker
changes()public
No documentation available.
# File activerecord/lib/active_record/attribute_mutation_tracker.rb, line 15
def changes
attr_names.each_with_object({}.with_indifferent_access) do |attr_name, result|
if changed?(attr_name)
result[attr_name] = [attributes[attr_name].original_value, attributes.fetch_value(attr_name)]
end
end
end