1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00

Use existing method for slightly DRYer code.

This commit is contained in:
Andy Stewart 2011-07-23 17:21:07 +01:00
parent 2e49b5abd0
commit 60410b99bd

View file

@ -121,7 +121,7 @@ module PaperTrail
:object => object_to_string(item_before_change),
:whodunnit => PaperTrail.whodunnit
}
if self.class.version_class_name.constantize.column_names.include?('object_changes')
if version_class.column_names.include? 'object_changes'
# The double negative (reject, !include?) preserves the hash structure of self.changes.
data[:object_changes] = self.changes.reject do |key, value|
!notably_changed.include?(key)