routes.rb 1.1 KB

123456789101112131415161718192021222324252627
  1. #---
  2. # Excerpted from "Agile Web Development with Rails",
  3. # published by The Pragmatic Bookshelf.
  4. # Copyrights apply to this code. It may not be used to create training material,
  5. # courses, books, articles, and the like. Contact us if you are in doubt.
  6. # We make no guarantees that this code is fit for any purpose.
  7. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  8. #---
  9. ActionController::Routing::Routes.draw do |map|
  10. # Add your own custom routes here.
  11. # The priority is based upon order of creation: first created -> highest priority.
  12. # Here's a sample route:
  13. # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  14. # Keep in mind you can assign values other than :controller and :action
  15. # You can have the root of your site routed by hooking up ''
  16. # -- just remember to delete public/index.html.
  17. # map.connect '', :controller => "welcome"
  18. # Allow downloading Web Service WSDL as a file with an extension
  19. # instead of a file named 'wsdl'
  20. map.connect ':controller/service.wsdl', :action => 'wsdl'
  21. # Install the default route as the lowest priority.
  22. map.connect ':controller/:action/:id'
  23. end