i am new to rails & using Trestle Admin as an easy backend solution for my app.
When i try to delete an item in the trestle admin backend, i get following error:
PG::ForeignKeyViolation: ERROR: update or delete on table "AAA" violates foreign > key constraint "fk_rails_xxxxxx" on table "BBB" DETAIL: Key (id)=(2) is still referenced from table "BBB".
Thats fine but instead of showing an application error i would like to check for the error and display a custom alert message. I don't know how this is possibly with trestle.. Has anyone an idea how to archive this?
Thanks