Guest User

Untitled

a guest
Aug 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. SampleApp::Application.routes.draw do
  2. resources :users
  3. resources :sessions, :only => [:new, :create, :destroy]
  4.  
  5. match '/signup', :to => 'users#new'
  6. match '/signin', :to => 'sessions#new'
  7. match '/signout', :to => 'sessions#destroy'
  8.  
  9.  
  10. match '/contact', :to => 'pages#contact'
  11. match '/about', :to => 'pages#about'
  12. match '/help', :to => 'pages#help'
  13.  
  14. root :to => 'pages#home'
  15.  
  16. # The priority is based upon order of creation:
  17. # first created -> highest priority.
  18.  
  19. # Sample of regular route:
  20. # match 'products/:id' => 'catalog#view'
  21. # Keep in mind you can assign values other than :controller and :action
  22.  
  23. # Sample of named route:
  24. # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  25. # This route can be invoked with purchase_url(:id => product.id)
  26.  
  27. # Sample resource route (maps HTTP verbs to controller actions automatically):
  28. # resources :products
  29.  
  30. # Sample resource route with options:
  31. # resources :products do
  32. # member do
  33. # get 'short'
  34. # post 'toggle'
  35. # end
  36. #
  37. # collection do
  38. # get 'sold'
  39. # end
  40. # end
  41.  
  42. # Sample resource route with sub-resources:
  43. # resources :products do
  44. # resources :comments, :sales
  45. # resource :seller
  46. # end
  47.  
  48. # Sample resource route with more complex sub-resources
  49. # resources :products do
  50. # resources :comments
  51. # resources :sales do
  52. # get 'recent', :on => :collection
  53. # end
  54. # end
  55.  
  56. # Sample resource route within a namespace:
  57. # namespace :admin do
  58. # # Directs /admin/products/* to Admin::ProductsController
  59. # # (app/controllers/admin/products_controller.rb)
  60. # resources :products
  61. # end
  62.  
  63. # You can have the root of your site routed with "root"
  64. # just remember to delete public/index.html.
  65. # root :to => "welcome#index"
  66.  
  67. # See how all your routes lay out with "rake routes"
  68.  
  69. # This is a legacy wild controller route that's not recommended for RESTful applications.
  70. # Note: This route will make all actions in every controller accessible via GET requests.
  71. # match ':controller(/:action(/:id(.:format)))'
  72. end
Add Comment
Please, Sign In to add comment