1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Updated and working!

This commit is contained in:
Blake Mizerany 2007-10-04 15:33:55 -07:00
parent 8413451cd1
commit 756b8e5de9
2 changed files with 7 additions and 6 deletions

View file

@ -24,7 +24,7 @@ end
# Custom 404
get 404 do
'Custom 404!!!!'
end
# get 404 do
# 'Custom 404!!!!'
# end

View file

@ -11,8 +11,8 @@ get '/' do
%li.item
%div
= item
%form{:action => "/", :method => 'POST'}
%input{:type => 'hidden', :name => '_method', :value => 'index'}
%form{:action => "/" + index.to_s, :method => 'POST'}
%input{:type => 'hidden', :name => '_method', :value => 'DELETE'}
%input{:type => 'submit', :value => 'delete'}
%form{:action => '/clear', :method => 'POST'}
%input{:value => 'clear', :type => :submit}
@ -33,5 +33,6 @@ post '/clear' do
end
delete '/:id' do
session[:items].delete_at(params[:id].to_i)
redirect '/'
end