Topic: subdomain routing?

we're begging phase 2 of our application where we need to be able to separate 'instances' of the application by organization, kinda like basecamp.  it looks like basecamp know's your organization based upon the subdomain?  can anyone point me to a tutorial of how to do this?
i'm guessing it's in the routing.

Re: subdomain routing?

See this: How to use subdomains as account key

Railscasts - Free Ruby on Rails Screencasts