Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

custom destroy/edit functions in rails active admin

I'd like to add some custom code to the destroy and edit default actions in active admin. Essentially, when I edit or delete a member, I want to sync that action with a copy on an external database.

I could either do a redirect to a custom method to do that then redirect back to the index, or create my own action in place of the default actions I could call.

Is there a better way to do this? preferably by just modifying the active admin destroy and edit functions?

like image 377
econclicks Avatar asked Jan 28 '26 18:01

econclicks


1 Answers

Customize controller answer on Stack Overflow

The example overrides create, but you can do the same with update and destroy.

like image 157
sorens Avatar answered Jan 30 '26 12:01

sorens



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!