Created
November 10, 2008 05:13
-
-
Save wycats/23424 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
Merb::Router.prepare do | |
resources :foos | |
end | |
class Foos < Application | |
def show(foo) | |
# here you have access to the foo resource (either the raw DM object or a wrapper) | |
end | |
end | |
# request /foo/1 routes to Foos#show(Foo.get(1)) or Foos#show(resource_wrapper) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment