title: Trying to use polymorphic relationship between comments and models
body: <p>I am following a railscasts guide ( <a href="http://asciicasts.com/episodes/154-polymorphic-association" rel="nofollow noreferrer">http://asciicasts.com/episodes/154-polymorphic-association</a> ) for making comments for different models, but I have run into a problem.</p>
  
  <p>When I try to go to localhost:3000/articles/id/comments/new, I get the following error:</p>
  
  <pre><code>undefined method `comments_path' for #&lt;#&lt;Class:0xb608b40&gt;:0xb607a60&gt;
  </code></pre>
  
  <p>It is coming from my comment form:</p>
  
  <pre><code>1: &lt;%= form_for([@commentable, @comment]) do |f| %&gt;
  2:   &lt;%#= render 'shared/error_messages', :object =&gt; f.object %&gt;
  3:   &lt;div class="field"&gt;
  4:     &lt;%= f.label :title %&gt;&lt;br /&gt;
  </code></pre>
  
  <p>Here are the contents of the new method of the comments controller:</p>
  
  <pre><code>  def new
      @comment = Comment.new
    end
  </code></pre>
  
  <p>One thing that differs from the cast, my routes.db has this:</p>
  
  <pre><code>  resources :articles do
      resources :comments
    end
  </code></pre>
  
  <p>instead of this:</p>
  
  <pre><code>  resources :articles, :has_many =&gt; :comments
  </code></pre>
  
  <p>I get a routes error if I do not do it like this.</p>
  
  <p>Any idea why? I know the guide is a little old, and I am on Rails 3.</p>