use flash.now to prevent late flashes

This commit is contained in:
Emi Matchu 2010-05-15 18:26:27 -04:00
parent fd61838946
commit 2f057ca7ca

View file

@ -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