diff app/controllers/pastes_controller.rb @ 10:56c17679105b

Moar pastes.
author Edho Arief <edho@myconan.net>
date Sun, 26 Aug 2012 11:59:55 -0700
parents 3a1f6c2e195d
children f3adcff48173
line wrap: on
line diff
--- a/app/controllers/pastes_controller.rb	Sun Aug 26 11:59:33 2012 -0700
+++ b/app/controllers/pastes_controller.rb	Sun Aug 26 11:59:55 2012 -0700
@@ -15,6 +15,11 @@
   # GET /pastes/new.json
   def new
     @paste = Paste.new
+    begin
+      @paste.paste = Paste.find(params[:base]).paste
+    rescue
+      nil
+    end
 
     respond_to do |format|
       format.html # new.html.erb