a guest Apr 22nd, 2018 47 Never
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)
- # These are nested routes
- map.resources :polls do |poll|
- poll.resource :options # To get a poll option, you want poll_options_path(@poll,@option)
- # A nested resource requires an argument for each level of nesting; a namespace does not.
RAW Paste Data