Skip to content

Instantly share code, notes, and snippets.

@adelcambre
Forked from carllerche/router.rb
Created October 11, 2008 19:50
Show Gist options
  • Save adelcambre/16315 to your computer and use it in GitHub Desktop.
Save adelcambre/16315 to your computer and use it in GitHub Desktop.
Merb::Router.prepare do
# I don't like the name :condition for this
resources :users, :condition => /.*/ do
resources :comments
end
# match("/users/:id", :id => /.*/)
# match("/users/:user_id/comments", :user_id => /.*/)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment