title: "Undefined method paginate" error message is coming while using will_paginate Gem
body: <p>I am getting the following error when i am implementing <code>will_paginate</code> gem in my app.</p>
  
  <p>Error:</p>
  
  <pre><code>NoMethodError in ProductsController#index
  
  undefined method `paginate' for #&lt;Array:0x2d25ae8&gt;
  
  app/controllers/products_controller.rb:3:in `index'
  </code></pre>
  
  <p>Please check my below code and please try to help me to resolve this.</p>
  
  <h1>Gemfile</h1>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '3.2.19'
  
  # Bundle edge Rails instead:
  # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git'
  
  gem 'sqlite3'
  
  
  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
    gem 'sass-rails',   '~&gt; 3.2.3'
    gem 'coffee-rails', '~&gt; 3.2.1'
  
    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer', :platforms =&gt; :ruby
  
    gem 'uglifier', '&gt;= 1.0.3'
  end
  
  gem 'jquery-rails'
  
  # To use ActiveModel has_secure_password
  # gem 'bcrypt-ruby', '~&gt; 3.0.0'
  
  # To use Jbuilder templates for JSON
  # gem 'jbuilder'
  
  # Use unicorn as the app server
  # gem 'unicorn'
  
  # Deploy with Capistrano
  # gem 'capistrano'
  
  # To use debugger
  # gem 'debugger'
  gem 'will_paginate', '~&gt; 3.0'
  </code></pre>
  
  <h1>views/products/index.html.erb</h1>
  
  <pre><code>&lt;%= will_paginate @products %&gt;
  &lt;table style="width:500px"&gt;
    &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Name&lt;/th&gt;
      &lt;th style="text-align:right;"&gt;Price&lt;/th&gt;
      &lt;th style="text-align:right;"&gt;Quantity&lt;/th&gt;
    &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
    &lt;% @products.each do |product| %&gt;
        &lt;tr&gt;
          &lt;td&gt;&lt;%= product.name %&gt;&lt;/td&gt;
          &lt;td style="text-align:right;"&gt;&lt;%= number_to_currency product.price %&gt;&lt;/td&gt;
          &lt;td style="text-align:right;"&gt;&lt;%= product.quantity %&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;% end %&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;%= will_paginate @products %&gt;
  </code></pre>
  
  <h1>controller/products_controller</h1>
  
  <pre><code>class ProductsController &lt; ApplicationController
    def index
      @products = Product.all.paginate(page: params[:page], per_page: 5)
    end
  end
  </code></pre>
  
  <p>Please try to help me.</p>