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
module Nuts::Controllers | |
class Words < R '/welcome/to/my/site' | |
def get | |
"You got here by: /welcome/to/my/site" | |
end | |
end | |
class Digits < R '/nuts/(\d+)' | |
def get(number) | |
"You got here by: /nuts/#{number}" | |
end | |
end | |
class Segment < R '/gorp/([^/]+)' | |
def get(everything_else_than_a_slash) | |
"You got here by: /gorp/#{everything_else_than_a_slash}" | |
end | |
end | |
class DigitsAndEverything < R '/nuts/(\d+)/([^/]+)' | |
def get(number, everything) | |
"You got here by: /nuts/#{number}/#{everything}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment