Skip to content
Browse files

Swapping in :select for :keep_if on changes array in :changes_for_pap…

…er_trail method for Ruby1.8.7 compatibility. Close #206
  • Loading branch information...
1 parent 01a1be4 commit 588af563b97a582b04d147d5b151a3be63edaaff Ben Atkins committed Feb 11, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGELOG.md
  2. +1 −1 lib/paper_trail/has_paper_trail.rb
View
1 CHANGELOG.md
@@ -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
2 lib/paper_trail/has_paper_trail.rb
@@ -217,7 +217,7 @@ def record_update
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

0 comments on commit 588af56

Please sign in to comment.
Something went wrong with that request. Please try again.