Override a Model’s destroy Method Without Losing Callbacks

I needed to do this in Rails 2, and had trouble finding any anything about how it could be done. I did eventually find some information, so I thought I’d share.

Here’s how it looked for me:


Also came across an article talking about some of the downsides to soft delete. Definitely a good reminder.

About Alexander

Alexander has been programming for a very long time. When he met Ruby, it was love at first sight.
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *