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.

47 lines
1.9 KiB

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