Created
March 18, 2009 22:23
-
-
Save lenary/81447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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