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:
parent
2e49b5abd0
commit
60410b99bd
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue