Skip to content

Commit

Permalink
Skip any changed attributes marked to skip in the papertrail options.…
Browse files Browse the repository at this point in the history
… Helps to resolve paper-trail-gem#224
  • Loading branch information
joshmcarthur committed Jul 1, 2013
1 parent c52ddfb commit 3c8ab37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paper_trail/has_paper_trail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def item_before_change
end
previous.tap do |prev|
prev.id = id
changed_attributes.each { |attr, before| prev[attr] = before }
changed_attributes.except(*self.class.paper_trail_options[:skip]).each { |attr, before| prev[attr] = before }
end
end

Expand Down

0 comments on commit 3c8ab37

Please sign in to comment.