Post by Peter Cooper on May 28th, 2006
Rails Routing Demystified

- 9 Great Ruby Libraries from Robot Co-op
- GeoKit: Geocoding and Location Finder Plugin for Rails
- Refactoring a Rails app to be RESTful


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).

Click here to add on del.icio.us








