Commit a6751886 by John Hawthorn

Remove destroy!

The default implementation is already destroy || raise
parent d8592ae2
......@@ -64,16 +64,6 @@ module Paranoia
end
end
# As of Rails 4.1.0 +destroy!+ will no longer remove the record from the db
# unless you touch the paranoia column before.
# We need to override it here otherwise children records might be removed
# when they shouldn't
if ActiveRecord::VERSION::STRING >= "4.1"
def destroy!
destroy || raise(ActiveRecord::RecordNotDestroyed)
end
end
def delete
touch_paranoia_column
end
......
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