Permalink
Browse files

Inverted the order with which the deleted_at attribute gets updated. …

…This way, dependent destroys work as expected
  • Loading branch information...
leonardoborges committed Apr 6, 2011
1 parent e80af3d commit f766bbc81c4d0b89d39062a716f4afa93bd6492d
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/paranoia.rb
View
@@ -1,8 +1,8 @@
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

0 comments on commit f766bbc

Please sign in to comment.