mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-19 00:27:25 +00:00
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.
5 lines
179 B
Plaintext
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 })
|