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

* Only add :format to routes if otherwise not explicitly set.

-- This allows us to remove the need to responds_to.
-- In other words... In the event of /foo.xml.. In the event of /foo.json...
This commit is contained in:
blake.mizerany@gmail.com 2007-09-25 00:03:04 +00:00
parent 0315f4bfb2
commit 3e085f52db
7 changed files with 19 additions and 71 deletions

View file

@ -1,7 +0,0 @@
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../../lib/'
require 'sinatra'
get '/' do
format.html { body 'blake' }
format.xml { body 'test' }
end

View file

@ -1,6 +0,0 @@
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../../lib/'
require 'sinatra'
get '/test/:name' do
params[:name]
end

View file

@ -1 +0,0 @@
<%= 1 + 3 %>