Basis of rails-driven app for local business
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

45 lines
1.9 KiB

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