# HG changeset patch # User Edho Arief # Date 1346007595 25200 # Node ID 56c17679105b6fefece5b478750bc4549ccd1d19 # Parent 9ba8cf402e066664171f3a748e3e0151c0201a83 Moar pastes. diff -r 9ba8cf402e06 -r 56c17679105b app/controllers/pastes_controller.rb --- 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 diff -r 9ba8cf402e06 -r 56c17679105b app/views/pastes/show.html.erb --- a/app/views/pastes/show.html.erb Sun Aug 26 11:59:33 2012 -0700 +++ b/app/views/pastes/show.html.erb Sun Aug 26 11:59:55 2012 -0700 @@ -10,4 +10,4 @@ <%= @paste.paste_hash %>

-<%= link_to 'Raw', paste_path(@paste, :txt) %> +<%= link_to 'Raw', paste_path(@paste, :txt) %> | <%= link_to 'New paste based on this', new_paste_path(:base => @paste.id) %> | <%= link_to 'More Paste', new_paste_path %>