Commit f766bbc8 by Leonardo Borges

Inverted the order with which the deleted_at attribute gets updated. This way,…

Inverted the order with which the deleted_at attribute gets updated. This way, dependent destroys work as expected
parent e80af3db
module Paranoia
def destroy
self[:deleted_at] ||= Time.now
self.save
_run_destroy_callbacks
self[:deleted_at] ||= Time.now
self.save
end
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