title: Rails tutorial will_paginate raises undefined_method total_pages
body: <p>Ive been stuck for a while now in the rails tutorial. Im in section 10.3, where we are supposed to add pagination. I have added the gem 'will-paginate' to my Gemfile, and this is the index view</p>
  
  <pre><code>&lt;h1&gt;All users&lt;/h1&gt;
  &lt;%= will_paginate %&gt;
  &lt;ul class="users"&gt;
  &lt;% @users.each do |user| %&gt;
      &lt;li&gt;
          &lt;%= gravatar_for user, :size =&gt; 30 %&gt;
          &lt;%= link_to user.name, user %&gt;
      &lt;/li&gt;
  &lt;% end %&gt;
  &lt;/ul&gt;
  &lt;%= will_paginate %&gt;
  </code></pre>
  
  <p>The server raises the following problem:</p>
  
  <pre><code>ActionView::Template::Error (undefined method `total_pages' for #&lt;Array:0xa0283fc&gt;):
      1: &lt;h1&gt;All users&lt;/h1&gt;
      2: &lt;%= will_paginate %&gt;
      3: &lt;ul class="users"&gt;
      4:  &lt;% @users.each do |user| %&gt;
      5:      &lt;li&gt;
  </code></pre>
  
  <p>I have been trying to search for it.. but none of the solutions to apparently similar issues worked. Any ideas?</p>