customize rails_admin delete action for a specific model

Viewed 4138

I've been reading the rails_admin wiki section about customizing actions but I am totally new to rails_admin and this documentation is a bit confusing for me.

What I need to achieve is that, when an admin user clicks the options to delete a specific Employee (Employee is a model in my app), the code to actually delete the given employee cannot be the default way in which rails_admin deletes, but a given block of code that I need to provide to rails_admin somehow.

Note that I still want the rest of the data models accessible through rails_admin to be deleted in the usual fashion. Only the employee model needs to have the custom delete routine.

2 Answers
Related