Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add flash message

Klaus Zanders842913f0f8dc
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 0a2735f11e0..6d3f62d5c62 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -77,6 +77,8 @@ class ProjectsController < ApplicationController
projects_menu_url(query_id: @query.id, controller_path: "projects")
)
+ turbo_streams << turbo_stream.replace("flash-messages", helpers.render_flash_messages)
+
render turbo_stream: turbo_streams
end
end
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index afca3f0a3dc..19249184b8e 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -119,7 +119,9 @@ See COPYRIGHT and LICENSE files for more details.
<main id="content-wrapper" class="<%= initial_classes %>">
<%= render_primer_banner_message %>
<%= render_streameable_primer_banner_message %>
- <%= render_flash_messages %>
+ <turbo-frame id="flash-messages">
+ <%= render_flash_messages %>
+ </turbo-frame>
<% if show_onboarding_modal? %>
<section data-augmented-model-wrapper
data-modal-initialize-now="true"