diff --git a/lib/paper_trail/has_paper_trail.rb b/lib/paper_trail/has_paper_trail.rb index 57f86970f..84ba280da 100644 --- a/lib/paper_trail/has_paper_trail.rb +++ b/lib/paper_trail/has_paper_trail.rb @@ -262,7 +262,7 @@ def item_before_change end previous.tap do |prev| prev.id = id - changed_attributes.except(*self.class.paper_trail_options[:skip]).each { |attr, before| prev[attr] = before } + changed_attributes.select { |k,v| self.class.column_names.include?(k) }.each { |attr, before| prev[attr] = before } end end