Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8377: regular_expressions_routes_documentation_fix.diff

File regular_expressions_routes_documentation_fix.diff, 0.8 kB (added by norbert, 2 years ago)
  • actionpack/lib/action_controller/routing.rb

    old new  
    188188  #  map.geocode 'geocode/:postalcode', :controller => 'geocode', 
    189189  #              :action => 'show', :postalcode => /\d{5}(-\d{4})?/ 
    190190  # 
    191   # or  more formally: 
     191  # or, more formally: 
    192192  # 
    193193  #   map.geocode 'geocode/:postalcode', :controller => 'geocode',  
    194   #                      :action => 'show',  
    195   #                      :requirements { :postalcode => /\d{5}(-\d{4})?/ } 
     194  #               :action => 'show', :requirements => { :postalcode => /\d{5}(-\d{4})?/ } 
    196195  # 
    197196  # == Route globbing 
    198197  #