title: Ruby on Rails undefined method `discussions_path' - nested resource, one-to-many relationship
body: <p>The problem seems so simple, but I just can't seem to fix it. I must be missing something obvious, but would really appreciate any help at all!</p>
  
  <p>Error message that appears:</p>
  
  <pre><code>undefined method `discussions_path' for #&lt;#&lt;Class:0x000001032e90d8&gt;:0x000001030f1168&gt;
  </code></pre>
  
  <p>Routes file:</p>
  
  <pre><code>resources :forums do
    resources :discussions
  end
  </code></pre>
  
  <p>Discussions/_form.html.erb file:</p>
  
  <pre><code>&lt;%= form_for [@forum, @discussion] do |f| %&gt;  
   &lt;%= f.error_messages %&gt;
   &lt;p&gt;  
    &lt;%= f.label :name %&gt;&lt;br /&gt;  
    &lt;%= f.text_field :name %&gt;  
   &lt;/p&gt;
   &lt;p&gt;&lt;%= f.submit "Submit" %&gt;&lt;/p&gt;  
  &lt;% end %&gt;
  </code></pre>
  
  <p>Discussions controller new action:</p>
  
  <pre><code>def new
    @forum = Forum.find_by_permalink(params[:id])
    @discussion = Discussion.new
  end
  </code></pre>
  
  <p>This is full error I'm now getting (in Terminal):</p>
  
  <pre><code>Started GET "/forums/general-chat/discussions/new" for 127.0.0.1 at 2012-04-14 18:35:28 +0100
  Processing by DiscussionsController#new as HTML
  Parameters: {"forum_id"=&gt;"general-chat"}
  Forum Load (1.6ms)  SELECT "forums".* FROM "forums" WHERE "forums"."permalink" IS NULL LIMIT 1
  Rendered layouts/_content_full_start.html.erb (0.0ms)
  Rendered discussions/_form.html.erb (574.4ms)
  Rendered discussions/new.html.erb within layouts/application (575.9ms)
  Completed 500 Internal Server Error in 581ms
  </code></pre>