]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5534'
authorTom Hughes <tom@compton.nu>
Wed, 22 Jan 2025 17:50:31 +0000 (17:50 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 22 Jan 2025 17:50:31 +0000 (17:50 +0000)
.rubocop_todo.yml
app/controllers/traces_controller.rb

index fa15ea90a0d5a1ba00019d93f94bc52a157a7fda..3d7cea500fec5826176e028bf5e13d19ec0ae79a 100644 (file)
@@ -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
index 14648dc9c37eea68d78bb9b255ede055cbca15c1..075b5a8649493bc216ba3b84faa6e56df0af015c 100644 (file)
@@ -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