title: Rails 3 Routing Error (Namespaced routes help)
body: <p>Model relationships:</p>
  
  <pre><code>class Project &lt; ActiveRecord::Base
    ...
    has_one :project_team
    ...
  end
  
  class ProjectTeam &lt; ActiveRecord::Base
    belongs_to :project
  end
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>class Project::TeamController &lt; ApplicationController
    ...
  end
  </code></pre>
  
  <p>Routes:</p>
  
  <pre><code>resources :projects do
    namespace :project do
      resources :team
    end
  end
  </code></pre>
  
  <p>Form code:</p>
  
  <pre><code>= form_for @project do |f|
  </code></pre>
  
  <p>When I visit the new Project form, I get the following error:</p>
  
  <pre><code>No route matches {:controller=&gt;"project/team", :project_id=&gt;#&lt;Project id: nil, user_id: 1 ...
  </code></pre>
  
  <p>I've tried many variations of this:</p>
  
  <pre><code>= form_for [:project, :team, @project] do |f|
  </code></pre>
  
  <p>To no avail. The routes are just barely off. But, I'm on the new project form, so I'm wondering why it's trying to grab the project team for that anyway.</p>
  
  <p>Thanks for the help! [:</p>