Commit f42b2cf9 by Tony Byrne

Restore ActiveRecord semantics, by returning a frozen instance of the deleted / destroyed model.

parent 897e25a7
...@@ -11,6 +11,7 @@ module Paranoia ...@@ -11,6 +11,7 @@ module Paranoia
_run_destroy_callbacks _run_destroy_callbacks
self[:deleted_at] ||= Time.now self[:deleted_at] ||= Time.now
self.save(:validate => false) self.save(:validate => false)
self.freeze
end end
alias :delete :destroy alias :delete :destroy
......
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