title: Rails Restful Routing and Subdomains
body: <p>I wondered if there were any plugins or methods which allow me to convert resource routes which allow me to place the controller name as a subdomain.</p>
  
  <p>Examples:</p>
  
  <pre><code>map.resources :users
  map.resource :account
  map.resources :blog
  ...
  
  example.com/users/mark
  example.com/account
  example.com/blog/subject
  example.com/blog/subject/edit
  ...
  
  #becomes
  
  users.example.com/mark
  account.example.com
  blog.example.com/subject
  blog.example.com/subject/edit
  ...
  </code></pre>
  
  <p>I realise I can do this with named routes but wondered if there were some way to keep my currently succinct routes.rb file.</p>