So after ajaxifying the Kaminari pagination links, though the pagination works, the url doesn't update with respective page number, pgsize
anymore. It works fine without remote: true
option. Below are the details, am i missing anything ?
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) %>");