Swapping in :select for :keep_if on changes array in :changes_for_paper_trail method for Ruby1.8.7 compatibility. Close #206

This commit is contained in:
Ben Atkins 2013-02-11 12:49:08 -05:00
parent 01a1be4438
commit 588af563b9
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
## 2.7.1 (Unreleased)
- [#206](https://github.com/airblade/paper_trail/issues/206) - Fixed Ruby 1.8.7 compatibility for tracking `object_changes`.
- [#200](https://github.com/airblade/paper_trail/issues/200) - Fixed `next_version` method so that it returns the live model
when called on latest reified version of a model prior to the live model.
- [#197](https://github.com/airblade/paper_trail/issues/197) - PaperTrail now falls back on using YAML for serialization of

View File

@ -217,7 +217,7 @@ module PaperTrail
end
def changes_for_paper_trail
self.changes.keep_if do |key, value|
self.changes.select do |key, value|
notably_changed.include?(key)
end.tap do |changes|
self.class.serialize_attribute_changes(changes) # Use serialized value for attributes when necessary