Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Merb::Router.prepare do
- resources :users do
- resources :comments
- end
- resources :articles do
- resources :comments
- end
- end
- # While in /users/1/comments/1
- url(:parents) # => /users
- url(:parent, @parent) # => /users/1
- # while in /articles/1/comments/1
- url(:parents) # => /articles
- url(:parent, @parent) # => /articles/1
Add Comment
Please, Sign In to add comment