Skip to content

Commit 66072f7

Browse files
author
Ben Atkins
committed
Finalize merge of pull request #178. [ fixed #177 ]
1 parent 6418899 commit 66072f7

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
## 2.6.4 (unreleased)
22

3+
- [#177](https://github.com/airblade/paper_trail/issues/177)/[#178](https://github.com/airblade/paper_trail/pull/178) -
4+
Factored out `version_key` into it's own method to prevent `ConnectionNotEstablished` error from getting thrown in
5+
instances where `has_paper_trail` is declared on class prior to ActiveRecord establishing a connection.
36
- [#176](https://github.com/airblade/paper_trail/pull/176) - Force metadata calls for attributes to use current value
47
if attribute value is changing.
58
- [#173](https://github.com/airblade/paper_trail/pull/173) - Update link to [diff-lcs](https://github.com/halostatue/diff-lcs).
6-
- [#172](https://github.com/airblade/paper_trail/pull/172) - Save object_changes on creation.
9+
- [#172](https://github.com/airblade/paper_trail/pull/172) - Save `object_changes` on creation.
710
- [#167](https://github.com/airblade/paper_trail/pull/167) - Fix `originator` method so that it works with subclasses and STI.
811
- [#160](https://github.com/airblade/paper_trail/pull/160) - Fixed failing tests and resolved out of date dependency issues.

lib/paper_trail/has_paper_trail.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def has_paper_trail(options = {})
7676
end
7777

7878
def version_key
79-
return self.version_class_name.constantize.primary_key
79+
self.version_class_name.constantize.primary_key
8080
end
8181

8282
# Switches PaperTrail off for this class.

0 commit comments

Comments
 (0)