Commit 49b9e68e by Iaan Krynauw

Use ActiveSupport.on_load to correctly re-open ActiveRecord::Base.…

Use ActiveSupport.on_load to correctly re-open ActiveRecord::Base. https://github.com/rubysherpas/paranoia/issues/335
parent b5b38231
......@@ -205,7 +205,8 @@ module Paranoia
end
end
class ActiveRecord::Base
ActiveSupport.on_load(:active_record) do
class ActiveRecord::Base
def self.acts_as_paranoid(options={})
alias_method :really_destroyed?, :destroyed?
alias_method :really_delete, :delete
......@@ -256,6 +257,7 @@ class ActiveRecord::Base
def paranoia_sentinel_value
self.class.paranoia_sentinel_value
end
end
end
require 'paranoia/rspec' if defined? RSpec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment