# HG changeset patch # User edogawaconan # Date 1381863609 -32400 # Node ID 200488650a860a13e1a23cfa7f9c1b4d9ba4d973 # Parent 4411631db561160e6baa20c55c4bac05ac02dccb flash.now !! diff -r 4411631db561 -r 200488650a86 app/controllers/pastes_controller.rb --- a/app/controllers/pastes_controller.rb Tue Oct 15 18:56:10 2013 +0000 +++ b/app/controllers/pastes_controller.rb Wed Oct 16 04:00:09 2013 +0900 @@ -48,7 +48,7 @@ format.html { redirect_to @paste, :notice => 'Paste was successfully created.' } format.json { render :json => @paste, :status => :created, :location => @paste } else - flash[:alert] = @paste.errors.full_messages.to_sentence + flash.now[:alert] = @paste.errors.full_messages.to_sentence format.html { render :action => "new" } format.json { render :json => @paste.errors, :status => :unprocessable_entity } end @@ -70,7 +70,7 @@ expire_page :controller => 'pastes', :action => 'show', :id => @paste.id redirect_to root_path, :notice => "Paste ##{params[:id]} deleted" else - flash[:alert] = @paste.errors.full_messages.to_sentence + flash.now[:alert] = @paste.errors.full_messages.to_sentence render :show end end