Guest User

Untitled

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