Mercurial > zeropaste
changeset 283:200488650a86
flash.now !!
author | edogawaconan <me@myconan.net> |
---|---|
date | Wed, 16 Oct 2013 04:00:09 +0900 |
parents | 4411631db561 |
children | bd29f6af1f1c |
files | app/controllers/pastes_controller.rb |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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