comparison app/controllers/pastes_controller.rb @ 190:d4682cea8e58

Fun with alerts.
author Edho Arief <edho@myconan.net>
date Sat, 23 Feb 2013 14:31:34 +0900
parents b4b7a29b70f6
children 4e409ac7082d
comparison
equal deleted inserted replaced
189:b4b7a29b70f6 190:d4682cea8e58
80 if @paste.key == params[:paste][:key] 80 if @paste.key == params[:paste][:key]
81 @paste.destroy 81 @paste.destroy
82 flash[:notice] = "Paste ##{params[:id]} deleted" 82 flash[:notice] = "Paste ##{params[:id]} deleted"
83 redirect_to root_path 83 redirect_to root_path
84 else 84 else
85 flash[:error] = 'Incorrect deletion key'
85 render :action => :show 86 render :action => :show
86 end 87 end
87 end 88 end
88 89
89 end 90 end