Skip to content

Instantly share code, notes, and snippets.

@lenary
Created March 18, 2009 22:23
Show Gist options
  • Save lenary/81447 to your computer and use it in GitHub Desktop.
Save lenary/81447 to your computer and use it in GitHub Desktop.
class Foo < Sinatra::Default
get '/' do
'hi'
end
end
class Bar < Sinatra::Default
get '/' do
'bye'
end
end
map '/bar' do
run Bar
end
map '/foo' do
run Foo
end
# surely you'd want the routes to map to:
# '/foo/' => 'hi'
# '/bar/' => 'bye'
# rather than have an overlap of the routes that are all at the top level.
# this might be hard to achieve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment