I’ve been reading “Pro ActiveRecord” by Kevin Marshall, Chad Pytel, and Jon Yurek. They explained in the book the difference between the delete and destroy methods, which is something I had never really seen clarified anywhere. I’ve discussed it with several Rails developers and have gotten varying opinions.
Here’s what I’ve come to understand. The destroy method makes the SQL call to the database and destroys the row in the table that contains it. It does still allow you to manipulate the object in the application as long as it’s still in scope.
The delete method also makes the SQL call, but freezes the object so you cannot make changes to it. It also doesn’t make the before_destroy and after_destroy callbacks.