Files
openfoodnetwork/app/views/admin/enterprises/destroy.turbo_stream.haml
David Rodríguez 6aa7ef3c21 Improve enterprise removal (success case)
Make enterprise removal use turbo, which provides the following
benefits:

* More responsive removal since there's no full page reload.
* A success flash message (previously nothing was displayed).
* No double alert prompt.

It also goes in the direction of removing mrujs in favor of turbo.
2025-11-27 19:09:35 +01:00

5 lines
179 B
Plaintext

- unless flash[:error]
= turbo_stream.remove "resource-#{@object.id}"
= turbo_stream.append "flashes" do
= render(partial: 'admin/shared/flashes', locals: { flashes: flash })