diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ebd12d36c..1d72a8bb8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,13 +8,7 @@ <%= yield :header %> - <% if notice = flash[:notice] || flash[:alert] %> -
-
- <%= notice %> -
-
- <% end %> + <%= render "layouts/shared/flash" %>
<%= yield %> diff --git a/app/views/layouts/shared/_flash.html.erb b/app/views/layouts/shared/_flash.html.erb new file mode 100644 index 000000000..652e3b130 --- /dev/null +++ b/app/views/layouts/shared/_flash.html.erb @@ -0,0 +1,9 @@ +<%= turbo_frame_tag :flash do %> + <% if notice = flash[:notice] || flash[:alert] %> +
+
+ <%= notice %> +
+
+ <% end %> +<% end %>