Update CHANGELOG + README as per #397 [ci skip]

This commit is contained in:
Ben Atkins 2014-07-22 19:40:11 -04:00
parent a4946e6f4b
commit 3f0a0276fe
2 changed files with 14 additions and 0 deletions

View File

@ -5,6 +5,11 @@
## 3.0.3
##### Breaking Change: If you use a custom initializer for PaperTrail in conjunction with Rails, you will need to add this line of code to the beginning of it:
```ruby
PaperTrail::Rails::Engine.eager_load!
```
- [#386](https://github.com/airblade/paper_trail/issues/386) - Fix eager loading of `versions` association with custom class name
in `ActiveRecord` 4.1.
- [#384](https://github.com/airblade/paper_trail/issues/384) - Fix `VersionConcern#originator` instance method.

View File

@ -481,6 +481,10 @@ You can avoid having to do this manually by setting your initializer to pick up
```ruby
# config/initializers/paper_trail.rb
# the following line is required for PaperTrail >= 3.0.3 with Rails
PaperTrail::Rails::Engine.eager_load!
if defined?(::Rails::Console)
PaperTrail.whodunnit = "#{`whoami`.strip}: console"
elsif File.basename($0) == "rake"
@ -556,6 +560,11 @@ If you only use custom version classes and don't use PaperTrail's built-in one,
- either declare the `PaperTrail::Version` class to be abstract like this (in an initializer):
```ruby
# config/initializers/paper_trail.rb
# the following line is required for PaperTrail >= 3.0.3 with Rails
PaperTrail::Rails::Engine.eager_load!
PaperTrail::Version.module_eval do
self.abstract_class = true
end