Guest User

Untitled

a guest
Apr 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # This is a namespace
  2. map.namespace(:admin) do |admin|
  3. admin.resources :orders # To get at an order, you want admin_orders_path(@order)
  4. end
  5. ##
  6. # These are nested routes
  7. map.resources :polls do |poll|
  8. poll.resource :options # To get a poll option, you want poll_options_path(@poll,@option)
  9. end
  10. # A nested resource requires an argument for each level of nesting; a namespace does not.
Add Comment
Please, Sign In to add comment