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

Don't set flash to nil, delete instead

Oliver Günther0b71e27de8c4
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 8052b5d6902..0547ab32894 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -55,7 +55,7 @@ class MyController < ApplicationController
# If mail changed, expire all other sessions
if @user.previous_changes['mail'] && ::Sessions::DropOtherSessionsService.call(@user, session)
flash[:info] = "#{flash[:notice]} #{t(:notice_account_other_session_expired)}"
- flash[:notice] = nil
+ flash.delete :notice
end
end