fix flashes staying on the page
This commit is contained in:
parent
a122106d82
commit
8232aa2a21
|
@ -17,7 +17,7 @@ class InboxController < ApplicationController
|
|||
.where(questions: { user_id: @target_user.id, author_is_anonymous: false })
|
||||
.count
|
||||
if @inbox_author.empty?
|
||||
flash[:info] = "No questions from @#{params[:author]} found, showing default entries instead!"
|
||||
flash.now[:info] = "No questions from @#{params[:author]} found, showing default entries instead!"
|
||||
@inbox
|
||||
@inbox_count
|
||||
else
|
||||
|
@ -25,7 +25,7 @@ class InboxController < ApplicationController
|
|||
@inbox_count = @inbox_author_count
|
||||
end
|
||||
rescue
|
||||
flash[:error] = "No user with the name @#{params[:author]} found, showing default entries instead!"
|
||||
flash.now[:error] = "No user with the name @#{params[:author]} found, showing default entries instead!"
|
||||
@inbox
|
||||
@inbox_count
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue