lundi 22 juin 2015

Kaminari URL not updating using AJAX in rails

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:

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

Aucun commentaire:

Enregistrer un commentaire