title: Handling has_one nested resource in Rails 3
body: <p>I got a User model and a About model. The about model is a page where users have more info about them that due its nature is more appropriate to have it on a separate model rather than in the user model. </p>
  
  <p>I want to be able to route it to something like /:username/about and get all the verbs working on that path (GET POST, PUT, DELETE).</p>
  
  <pre><code>/:username/about
  /:username/about/edit
  /:username/about
  </code></pre>
  
  <p>This is what I already have</p>
  
  <pre><code># routes.rb
  resources :users do 
    resources :abouts
  end
  
  match ':username/about' =&gt; 'abouts#show', :as =&gt; :user_about
  match ':username/about/add' =&gt; 'abouts#new', :as =&gt; :user_new_about    
  match ':username/about/edit' =&gt; 'abouts#edit', :as =&gt; :user_edit_about
  </code></pre>
  
  <p>And in the models I have</p>
  
  <pre><code># about.rb
  belongs_to :user
  
  # user.rb
  has_one :about
  </code></pre>
  
  <p>When I'm doing a post or put to /roses/about It's interpreting It as a show</p>
  
  <pre><code>Started POST "/roses/about" for 127.0.0.1 at Sun Feb 27 16:24:18 -0200 2011
    Processing by AboutsController#show as HTML
  </code></pre>
  
  <p>I'm probably missing the declaration in the routes, but doesn't it get messy declaring each verb for a resource when it's different from the default?</p>
  
  <p>What's the simplest and cleaner way to archive this?</p>