Class: TrackChanges::Diff
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- TrackChanges::Diff
- Defined in:
- app/models/track_changes/diff.rb
Instance Method Summary collapse
-
#changes ⇒ Object
Returns a hash of changes where the key is the field name and the value is an array of the from value and the to value.
Instance Method Details
#changes ⇒ Object
Returns a hash of changes where the key is the field name and the value is an array of the from value and the to value
12 13 14 15 16 |
# File 'app/models/track_changes/diff.rb', line 12 def changes Hash[(from.keys + to.keys).collect do |key| [key, [from[key], to[key]]] end] end |