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
1 changed files with 1 additions and 1 deletions

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)