Guest User

Untitled

a guest
May 25th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. ActionController::Routing::Routes.draw do |map|
  2. map.resources :users
  3.  
  4. # The priority is based upon order of creation: first created -> highest priority.
  5.  
  6. # Sample of regular route:
  7. # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  8. # Keep in mind you can assign values other than :controller and :action
  9.  
  10. # Sample of named route:
  11. # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  12. # This route can be invoked with purchase_url(:id => product.id)
  13.  
  14. # Sample resource route (maps HTTP verbs to controller actions automatically):
  15. # map.resources :products
  16.  
  17. # Sample resource route with options:
  18. # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
  19.  
  20. # Sample resource route with sub-resources:
  21. # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
  22.  
  23. # Sample resource route with more complex sub-resources
  24. # map.resources :products do |products|
  25. # products.resources :comments
  26. # products.resources :sales, :collection => { :recent => :get }
  27. # end
  28.  
  29. # Sample resource route within a namespace:
  30. # map.namespace :admin do |admin|
  31. # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
  32. # admin.resources :products
  33. # end
  34.  
  35. # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
  36. # map.root :controller => "welcome"
  37.  
  38. # See how all your routes lay out with "rake routes"
  39.  
  40. # Install the default routes as the lowest priority.
  41. # Note: These default routes make all actions in every controller accessible via GET requests. You should
  42. # consider removing the them or commenting them out if you're using named routes and resources.
  43. map.connect ':controller/:action/:id'
  44. map.connect ':controller/:action/:id.:format'
  45. end
Add Comment
Please, Sign In to add comment