Guest User

Untitled

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