From 8232aa2a2185123b06c99aa29c8ddfeaaf8a4acf Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Fri, 17 Jul 2015 21:34:53 +0200 Subject: [PATCH] fix flashes staying on the page --- app/controllers/inbox_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/inbox_controller.rb b/app/controllers/inbox_controller.rb index 6b4d7e03..e97ee134 100644 --- a/app/controllers/inbox_controller.rb +++ b/app/controllers/inbox_controller.rb @@ -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