Skip to content

Commit

Permalink
Swapping in :select for :keep_if on changes array in :changes_for_pap…
Browse files Browse the repository at this point in the history
…er_trail method for Ruby1.8.7 compatibility. Close #206
  • Loading branch information
Ben Atkins committed Feb 11, 2013
1 parent 01a1be4 commit 588af56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion lib/paper_trail/has_paper_trail.rb
Expand Up @@ -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
Expand Down

0 comments on commit 588af56

Please sign in to comment.