Routing is the new name for what was previously known as Directions. The move of responsibility from mod_rewrite and into Rails. This project is now good enough to have moved off the branch it was growing on and into the trunk and beta gems. This also means, however, that the trunk and the beta gems are currently not directly backwards compatible with existing applications.

We’re going to make sure that the migrating documentation is superb for release, but if you’re too impatient, here are the few steps you need to take on applications that doesn’t use custom URLs (those will be a bit more cumbersome to port):

1. Create config/routes.rb with the following content:

ActionController::Routing::Routes.draw do |map|
# Add your own custom routes here.
# The priority is based upon order of creation: first created -> highest priority.
# Here's a sample route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
# Install the default route as the lowest priority.
map.connect ':controller/:action/:id'
end

3. Add the new independent Active Support library to the default loads. For gem installations, it means adding require_gem 'activesupport' right underneath require 'rubygems' in config/environment.rb. It’ll then look like:

For SVN/tgz installations, it means adding vendor/activesupport/lib to the ADDITIONAL_LOAD_PATHS and add require 'active_support' under # Require Rails libraries. also in config/environment.rb. It’ll then look like: