mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Merge pull request #813 from md5/fix-belongs_to_required_by_default-warning
Fix deprecation warning for paper_trail_on_destroy(:after)
This commit is contained in:
commit
7842ae8aa9
1 changed files with 2 additions and 2 deletions
|
@ -179,8 +179,8 @@ module PaperTrail
|
|||
raise ArgumentError, 'recording order can only be "after" or "before"'
|
||||
end
|
||||
|
||||
if recording_order == "after" &&
|
||||
Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("5")
|
||||
if recording_order.to_s == "after" &&
|
||||
Gem::Version.new(ActiveRecord::VERSION::STRING).release >= Gem::Version.new("5")
|
||||
if ::ActiveRecord::Base.belongs_to_required_by_default
|
||||
::ActiveSupport::Deprecation.warn(
|
||||
"paper_trail_on_destroy(:after) is incompatible with ActiveRecord " +
|
||||
|
|
Loading…
Reference in a new issue