Use flash.now for messages to be shown during this request
This commit is contained in:
parent
7b19ba580c
commit
322c6c31a5
2 changed files with 1 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue