title: rails ransack remote true with pagination
body: <p>I've a controller for <code>WeekDay</code>. Then I tried to add RanSack in my project. It works good except when I tried to enable <code>remote true</code>, it shows only search form. AJAX call is being made, but nothing shows up.</p>
  
  <p><strong>Controller code</strong></p>
  
  <pre><code>def index
    @q = WeekDay.ransack(params[:q])
    @week_days = @q.result().page(params[:page]).per(10)
  
    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @week_days }
    end
  end
  </code></pre>
  
  <p><strong>index.html.erb</strong></p>
  
  <pre><code>&lt;div id="week_days"&gt;&lt;%= render 'week_days' %&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>_week_days.html.erb</strong></p>
  
  <pre><code>&lt;%= search_form_for @q,remote: true do |f| %&gt;
  &lt;%= f.label :datum_gteq %&gt;
  &lt;%= f.date_field :datum_gteq%&gt;
  &lt;%= f.label :datum_lteq %&gt;
  &lt;%= f.date_field :datum_lteq %&gt;
  &lt;%= f.submit %&gt;
  &lt;% end %&gt;
  &lt;table&gt; 
  &lt;thead&gt;
  &lt;tr&gt;
    &lt;th&gt;&lt;%=sort_link @q, :datum %&gt;&lt;/th&gt;
    &lt;th colspan="3"&gt;&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
  &lt;% @week_days.each do |week_day| %&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;%= l week_day.datum %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Show', week_day %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Edit', edit_week_day_path(week_day) %&gt;&lt;/td&gt;
  
    &lt;/tr&gt;
  &lt;% end %&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;%= paginate @week_days %&gt;
  &lt;br&gt;
  
  &lt;%= link_to 'New Week Day', new_week_day_path %&gt;
  </code></pre>