diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d1842151..bc51508f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -75,7 +75,7 @@ def redirect_back_with_referer_params(fallback_location:) def render_flash(type: :success, message: "") flash[type] = message unless message.blank? - turbo_stream.update "turbo-flash", partial: "shared/flash" + turbo_stream.replace "turbo-flash", partial: "shared/flash" end private diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d53b090c..18340b6f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -2,9 +2,7 @@ <%= turbo_stream_from "media_sync" %> <% if native_app? %> -
- <%= render "shared/flash" %> -
+ <%= render "shared/flash" %>
<%= yield %>
@@ -23,9 +21,7 @@
-
- <%= render "shared/flash" %> -
+ <%= render "shared/flash" %> <%= render "shared/search_bar" %> <%= render "shared/nav_bar" %>
diff --git a/app/views/layouts/plain.html.erb b/app/views/layouts/plain.html.erb index dcb115d1..06c1a6b6 100644 --- a/app/views/layouts/plain.html.erb +++ b/app/views/layouts/plain.html.erb @@ -1,7 +1,5 @@ <% content_for :body do %> -
- <%= render "shared/flash" %> -
+ <%= render "shared/flash" %>
diff --git a/app/views/shared/_flash.html.erb b/app/views/shared/_flash.html.erb index 017a0c27..9afcee47 100644 --- a/app/views/shared/_flash.html.erb +++ b/app/views/shared/_flash.html.erb @@ -1,4 +1,4 @@ -
+
<% flash.each do |key, value| %>
<%= h value %>