Kaminari url not updating using AJAX in rails

So, after animating the Kaminari pagination links, although the pagination works, the URL does not update with the appropriate one page number, pgsize

. It works fine without the option remote: true

. Below are the details, am I missing something?

My view:

    <div id="paginator">
      <%= paginate @user, params: {id: nil, pgsz: 20}, :remote => true %>
    </div>

      

MY Controller: Show Method

  @user = Kaminari.paginate_array(@properties, total_count: @search_result.total_count).page(params[:page]).per(params[:pgsz] ||= 20)

      

In show.js.erb

$('#list').html("<%= escape_javascript(render 'search_result') %>");
$('#paginator').html(" <%= escape_javascript(paginate @user, params: {id: nil, pgsz: 20}, :remote => true) %>");

      

+3


source to share





All Articles