Commit 2a3ce8b5 by Ryan Bigg

Merge pull request #60 from delba/guardclause

use a GuardClause
parents 5aaef5ad 45520239
......@@ -20,7 +20,8 @@ module Paranoia
end
def delete
update_attribute_or_column(:deleted_at, Time.now) if !deleted? && persisted?
return if new_record? or destroyed?
update_attribute_or_column :deleted_at, Time.now
end
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