Best way to handle DeleteAction integrity constraint violations
Hi all
I've got a model with a restrictOnDelete relationship, so when I click the DeleteAction I get an integrity contraint violation.
I want to show a notification explaining why the record can't be deleted. What's the best way to handle this? Using the
Thanks
I've got a model with a restrictOnDelete relationship, so when I click the DeleteAction I get an integrity contraint violation.
I want to show a notification explaining why the record can't be deleted. What's the best way to handle this? Using the
before() lifecycle hook? Or is there a better way?Thanks