Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

Rails Routing Demystified

By Peter Cooper / May 28, 2006

Rodney, the Pin Up Geek, has set out to demystify the routing system in Ruby on Rails. He provides lots of basic code examples and shows you how to use most of the features of routes, like in this example of a requirements based route that only routes when a postal code is included in the URL:

map.geocode 'geocode/:postalcode', :controller => 'geocode',
                                    :action        => 'show',
                                    :postalcode => /d{5}(-d{4})?/

Excellent article for beginners and gurus alike (there's always something new to learn).

Other Posts to Enjoy

Twitter Mentions