ignasio
ignasio

Reputation: 1

RailsAdmin handle callbacks

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?

Upvotes: 0

Views: 820

Answers (1)

a14m
a14m

Reputation: 8055

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

Upvotes: 1

Related Questions