diff --git a/lib/paper_trail/has_paper_trail.rb b/lib/paper_trail/has_paper_trail.rb index 7f149c46..f4bc2e8d 100644 --- a/lib/paper_trail/has_paper_trail.rb +++ b/lib/paper_trail/has_paper_trail.rb @@ -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)