Advertisement
Guest User

Untitled

a guest
Jan 6th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 1.68 KB | None | 0 0
  1. Myapp::Application.routes.draw do
  2.   resources :comments
  3.  
  4.   resources :pages
  5.  
  6.   get "home/index"
  7.   # The priority is based upon order of creation: first created -> highest priority.
  8.   # See how all your routes lay out with "rake routes".
  9.  
  10.   # You can have the root of your site routed with "root"
  11. root to: 'home#index'
  12.   # Example of regular route:
  13.   #   get 'products/:id' => 'catalog#view'
  14.  
  15.   # Example of named route that can be invoked with purchase_url(id: product.id)
  16.   #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
  17.  
  18.   # Example resource route (maps HTTP verbs to controller actions automatically):
  19.   #   resources :products
  20.  
  21.   # Example resource route with options:
  22.   #   resources :products do
  23.   #     member do
  24.   #       get 'short'
  25.   #       post 'toggle'
  26.   #     end
  27.   #
  28.   #     collection do
  29.   #       get 'sold'
  30.   #     end
  31.   #   end
  32.  
  33.   # Example resource route with sub-resources:
  34.   #   resources :products do
  35.   #     resources :comments, :sales
  36.   #     resource :seller
  37.   #   end
  38.  
  39.   # Example resource route with more complex sub-resources:
  40.   #   resources :products do
  41.   #     resources :comments
  42.   #     resources :sales do
  43.   #       get 'recent', on: :collection
  44.   #     end
  45.   #   end
  46.  
  47.   # Example resource route with concerns:
  48.   #   concern :toggleable do
  49.   #     post 'toggle'
  50.   #   end
  51.   #   resources :posts, concerns: :toggleable
  52.   #   resources :photos, concerns: :toggle able
  53.  
  54.   # Example resource route within a namespace:
  55.   #   namespace :admin do
  56.   #     # Directs /admin/products/* to Admin::ProductsController
  57.   #     # (app/controllers/admin/products_controller.rb)
  58.   #     resources :products
  59.   #   end
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement