Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This is a namespace
- map.namespace(:admin) do |admin|
- admin.resources :orders # To get at an order, you want admin_orders_path(@order)
- end
- ##
- # These are nested routes
- map.resources :polls do |poll|
- poll.resource :options # To get a poll option, you want poll_options_path(@poll,@option)
- end
- # A nested resource requires an argument for each level of nesting; a namespace does not.
Add Comment
Please, Sign In to add comment