comparison 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
comparison
equal deleted inserted replaced
9:9ba8cf402e06 10:56c17679105b
13 13
14 # GET /pastes/new 14 # GET /pastes/new
15 # GET /pastes/new.json 15 # GET /pastes/new.json
16 def new 16 def new
17 @paste = Paste.new 17 @paste = Paste.new
18 begin
19 @paste.paste = Paste.find(params[:base]).paste
20 rescue
21 nil
22 end
18 23
19 respond_to do |format| 24 respond_to do |format|
20 format.html # new.html.erb 25 format.html # new.html.erb
21 format.json { render :json => @paste } 26 format.json { render :json => @paste }
22 end 27 end