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.

43 lines
1.9 KiB

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