Guest User

Untitled

a guest
Feb 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. Merb::Router.prepare do
  2. resources :foos
  3. end
  4.  
  5. class Foos < Application
  6. def show(foo)
  7. # here you have access to the foo resource (either the raw DM object or a wrapper)
  8. end
  9. end
  10.  
  11. # request /foo/1 routes to Foos#show(Foo.get(1)) or Foos#show(resource_wrapper)
Add Comment
Please, Sign In to add comment