Archiving instead of deleting – co-opt destroy?

For many of my applications that I'm working on you can't really delete records...they can be made inactive, but they need to be maintained as their related records can't be deleted for various reasons.

I like the idea of 'co-opting' the destroy method (you have to do it in the model) to switch the archive toggle instead of deleting the record...that way I can keep the restful routes.

Is this the 'rails way' or am I violating one of the principles?

1 thought on “Archiving instead of deleting – co-opt destroy?”

Leave a Comment