Commit d88f3b27 by John Hawthorn

Use destroy_without_paranoia

parent d99f42d3
...@@ -163,7 +163,7 @@ end ...@@ -163,7 +163,7 @@ end
class ActiveRecord::Base class ActiveRecord::Base
def self.acts_as_paranoid(options={}) def self.acts_as_paranoid(options={})
alias :really_destroyed? :destroyed? alias :really_destroyed? :destroyed?
alias :destroy! :destroy alias :destroy_without_paranoia :destroy
alias :delete! :delete alias :delete! :delete
def really_destroy! def really_destroy!
dependent_reflections = self.class.reflections.select do |name, reflection| dependent_reflections = self.class.reflections.select do |name, reflection|
...@@ -184,7 +184,7 @@ class ActiveRecord::Base ...@@ -184,7 +184,7 @@ class ActiveRecord::Base
end end
end end
touch_paranoia_column if ActiveRecord::VERSION::STRING >= "4.1" touch_paranoia_column if ActiveRecord::VERSION::STRING >= "4.1"
destroy! destroy_without_paranoia
end end
include Paranoia include Paranoia
......
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