From: Tom Hughes Date: Wed, 22 Jan 2025 17:50:31 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/5534' X-Git-Tag: live~176 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/405559c5bb3fb563fff3919f4c2a4292b9ad34fc?hp=7b19ba580c42f177d295011a136bb38957b475bc Merge remote-tracking branch 'upstream/pull/5534' --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index fa15ea90a..3d7cea500 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -106,19 +106,6 @@ Minitest/EmptyLineBeforeAssertionMethods: Minitest/MultipleAssertions: Max: 60 -# Offense count: 10 -# This cop supports unsafe autocorrection (--autocorrect-all). -Rails/ActionControllerFlashBeforeRender: - Exclude: - - 'app/controllers/application_controller.rb' - - 'app/controllers/confirmations_controller.rb' - - 'app/controllers/issue_comments_controller.rb' - - 'app/controllers/messages_controller.rb' - - 'app/controllers/passwords_controller.rb' - - 'app/controllers/traces_controller.rb' - - 'app/controllers/user_blocks_controller.rb' - - 'app/controllers/users_controller.rb' - # Offense count: 2 # Configuration parameters: Include. # Include: app/models/**/*.rb diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 14648dc9c..075b5a864 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -116,7 +116,7 @@ class TracesController < ApplicationController @trace.schedule_import redirect_to :action => :index, :display_name => current_user.display_name else - flash[:error] = t(".upload_failed") if @trace.valid? + flash.now[:error] = t(".upload_failed") if @trace.valid? render :action => "new" end