12398: append flash in the flashes container

This commit is contained in:
Ahmed Ejaz
2024-05-29 01:20:10 +05:00
parent 8ee833d2d8
commit a93ce4ea55

View File

@@ -1,6 +1,5 @@
- # @record can either be Product or Variant
- unless flash[:error]
= turbo_stream.remove(dom_id(@record))
-# Without +formats+ option here, by default render is trying to render the equivalant turbo stream
-# It's strange that it works just fine if I remove the +unless+ above
= render(partial: 'admin/shared/flashes', locals: { flashes: flash }, formats: [:html])
= turbo_stream.append "flashes" do
= render(partial: 'admin/shared/flashes', locals: { flashes: flash })