RailsAdmin handle callbacks

805 Views Asked by At

How do I can check if model was updated via rails_admin. Is there anything like rails_admin_before_save?

If it wasn`t implemented yet. Is there any ways to get such behaviour?

1

There are 1 best solutions below

2
On

AFAIK there is no rails_admin_before_save callback... no callbacks for specific rails admin actions... but RailsAdmin runs the models callbacks,

so if you have a before_save callback in your model, it'll run...

as for checking you can check that the model fields was updated appropriately... you can add auditing and history extensions (plugins) for rails admin to record every change that happens to the models like these