mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Make sure failure to delete due to dependent objects is handled through activemodel errors and not by rescuing `ActiveRecord::DeleteRestrictionError` exceptions. Previously we would display two alert prompts, and we would weirdly display the content of our 500 error page on top of the screen. Now, we display a flash error message explaining the reason to fail to remove it.