title: Nested resources in namespace form_for
body: <p><strong>Problem</strong></p>
  
  <p>The form_for helper incorrectly determines the path to my nested resource inside of a namespace. The models in question are: <strong>Forum::Thread</strong> and <strong>Forum::Reply</strong> respectively, located in a subfolder called "forum" under my models directory. This is in Rails 3 BETA 3.</p>
  
  <p><strong>routes.rb</strong></p>
  
  <pre><code>  namespace :forum do
      root :to =&gt; 'threads#index'
      resources :threads do
        resources :replies
      end
    end
  </code></pre>
  
  <p><strong>app/views/forum/replies/_form.html.haml</strong></p>
  
  <pre><code>...
    - form_for [@thread, @reply] do |f|
  ...
  </code></pre>
  
  <p><strong>app/controllers/forum/replies_controller.rb</strong></p>
  
  <pre><code>...
    def new
      @reply = Forum::Reply.new
    end
  ...
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>undefined method `forum_thread_forum_replies_path'
  </code></pre>
  
  <p>In reference to the line outlined above in _form.html.haml</p>