changeset 191:4e409ac7082d

Also expires the page upon deletion.
author Edho Arief <edho@myconan.net>
date Sat, 23 Feb 2013 14:53:47 +0900
parents d4682cea8e58
children 1da19a81f5d7
files app/controllers/pastes_controller.rb
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/app/controllers/pastes_controller.rb	Sat Feb 23 14:31:34 2013 +0900
+++ b/app/controllers/pastes_controller.rb	Sat Feb 23 14:53:47 2013 +0900
@@ -79,6 +79,7 @@
     @paste = Paste.find(params[:id].to_i)
     if @paste.key == params[:paste][:key]
       @paste.destroy
+      expire_page :controller => 'pastes', :action => 'show', :id => @paste.id
       flash[:notice] = "Paste ##{params[:id]} deleted"
       redirect_to root_path
     else