diff app/controllers/pastes_controller.rb @ 246:8ab17063419f

Forgot to push production's updates.
author edogawaconan <me@myconan.net>
date Mon, 07 Oct 2013 04:18:17 +0000
parents 16251b94eb6c
children 6cca1ab53337
line wrap: on
line diff
--- a/app/controllers/pastes_controller.rb	Fri Aug 09 08:43:08 2013 +0000
+++ b/app/controllers/pastes_controller.rb	Mon Oct 07 04:18:17 2013 +0000
@@ -18,10 +18,7 @@
   def new
     @paste = Paste.new
     @paste.set_paste_key
-    begin
-      @paste.paste = Paste.find(params[:base]).paste
-    rescue
-    end
+    @paste.paste = Paste.safe_find(params[:base]).try(:paste)
 
     respond_to do |format|
       format.html # new.html.erb