Mercurial > zeropaste
comparison app/controllers/pastes_controller.rb @ 240:16251b94eb6c
Whoops, forgot to secure the "new paste based on ##"
| author | edogawaconan <me@myconan.net> |
|---|---|
| date | Mon, 07 Oct 2013 13:14:37 +0900 |
| parents | 388504e43bcf |
| children | 6cca1ab53337 |
comparison
equal
deleted
inserted
replaced
| 239:a8942fab1f34 | 240:16251b94eb6c |
|---|---|
| 16 | 16 |
| 17 # GET / | 17 # GET / |
| 18 def new | 18 def new |
| 19 @paste = Paste.new | 19 @paste = Paste.new |
| 20 @paste.set_paste_key | 20 @paste.set_paste_key |
| 21 begin | 21 @paste.paste = Paste.safe_find(params[:base]).try(:paste) |
| 22 @paste.paste = Paste.find(params[:base]).paste | |
| 23 rescue | |
| 24 end | |
| 25 | 22 |
| 26 respond_to do |format| | 23 respond_to do |format| |
| 27 format.html # new.html.erb | 24 format.html # new.html.erb |
| 28 end | 25 end |
| 29 end | 26 end |
