title: The users variable appears to be empty for will_paginate
body: <p>I am following the Railcast tutorial on endless page. I am receiving a Argument Error <code>The @users variable appears to be empty. Did you forget to pass the collection object for will_paginate?</code></p>
  
  <p>The javascript has been modified so you have to click a read more link to get more results. So the pagination will work by click instead of scrolling.</p>
  
  <p>The error points to the line <code>&lt;%= will_paginate @questions %&gt;</code></p>
  
  <p>Questions Controller:</p>
  
  <pre><code>      def index
  #Before gem added it was `@questions = Question.all`
          @questions = Question.order("question").page(params[:users]).per_page(2)    
          respond_with(@questions)
      end
  </code></pre>
  
  <p>Users Controller:</p>
  
  <pre><code>  def profile
      @profile = User.profile
      @user = User.find(params[:id]) 
      @question = Question.where(recipient_id: params[:id]).first
    end
  
    def show
      @user = User.find(params[:id])
      @question = Question.where(recipient_id: params[:id])
    end
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;% @question.select(&amp;:answer?).each do |question| %&gt;
  Question: &lt;%= question.question %&gt;
  &lt;br&gt;
  Answer: &lt;%= question.answer %&gt;&lt;br&gt;&lt;br&gt;
  
  &lt;%= will_paginate @questions %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Questions.js.coffee:</p>
  
  <pre><code>jQuery -&gt;
    if $('.pagination').length
      $('#append_and_paginate').prepend('&lt;a id="append_more_results" href="javascript:void(0);"&gt;Show more questions&lt;/a&gt;');
      $('#append_more_results').click -&gt;
        url = $('.pagination .next_page').attr('href')
        if url
          $('.pagination').text('Fetching more questions...')
          $.getScript(url)
  </code></pre>
  
  <p>Index.js.erb:</p>
  
  <pre><code>$('#questions').append('&lt;%= j render(@questions) %&gt;');
  &lt;% if @questions.next_page %&gt;
    $('.pagination').replaceWith('&lt;%= j will_paginate(@questions) %&gt;');
  &lt;% else %&gt;
    $('#append_and_paginate').remove();
  &lt;% end %&gt;
  &lt;% sleep 1 %&gt;
  </code></pre>