Commit 83e31449 by Dobaczewski Committed by Ryan Bigg

destroy! when destroying deleted? records

parent 26b9f4f7
...@@ -30,6 +30,7 @@ module Paranoia ...@@ -30,6 +30,7 @@ module Paranoia
def delete def delete
return if new_record? or destroyed? return if new_record? or destroyed?
update_column :deleted_at, Time.now update_column :deleted_at, Time.now
destroyed? ? destroy! : update_column(:deleted_at, Time.now)
end end
def restore! def restore!
......
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