daily pastebin goal
90%
SHARE
TWEET

Untitled

a guest Apr 22nd, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.
RAW Paste Data
Top