From 2f057ca7cac758b8fc98c4ad023af44f690b7900 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 15 May 2010 18:26:27 -0400 Subject: [PATCH] use flash.now to prevent late flashes --- app/controllers/items_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index c419c5f4..84039c21 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -5,7 +5,7 @@ class ItemsController < ApplicationController begin @results = Item.search(@query).alphabetize.paginate :page => params[:page] rescue - flash[:alert] = $!.message + flash.now[:alert] = $!.message end end end