Questions tagged [kaminari]

A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Rails 3

A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Rails 3

572 questions
3
votes
2 answers

Order by associated model with pagination

rails: '4.2.10' kaminari: '1.0.1' I'm working with a very simple relationship where a Conversation has many ConversationMessages. I am displaying these Conversation records on an index, and am wanting to sort them by the ones which have the most…
Tony Beninate
  • 1,926
  • 1
  • 24
  • 44
3
votes
1 answer

Why only first page results get exported to csv?

I am trying to get ALL the filtered results when exporting to CSV. My to_csv is working fine, and I suspect something to do with my controller. Search around with kaminari, ransack, but seems like even exporting to csv is rare using ransack. Any…
Iqlaas Ismail
  • 385
  • 7
  • 21
3
votes
0 answers

how to use kaminari with vue.js

Well, the question is: is there any possibility to use kaminari paginator with vue.js in ruby on rails project? According to kaminari tutorial, I just can do this in my controller class PostsController < ApplicationController def index @posts…
tagaism
  • 624
  • 2
  • 7
  • 26
3
votes
2 answers

Get kaminari pagination links in the JSON generated by the active model serializer

I am trying to convert @admins to JSON using the AdminSerializer #app/serializers/admin_serializer.rb class AdminSerializer < ActiveModel::Serializer attributes :id, :email, :access_locked? end where Admins is>> @admins = @search.result(:distinct…
3
votes
1 answer

Kaminari generates string instead of html

There was question like this in november, but no anwers was given. Kaminari generates string instead of html in production And no feedback from author, lack of reputation does not give me the opportunity to ask question there, also my problem a…
BadAllOff
  • 88
  • 2
  • 7
3
votes
1 answer

What generates the first ActiveAdmin COUNT query?

The beginning of my ActiveAdmin rails log for a query looks like this: Started GET "/things" for 127.0.0.1 at 2015-12-17 15:43:30 -0500 Processing by ThingsController#index as HTML AdminUser Load (57.1ms) SELECT `admin_users`.* FROM `admin_users`…
3
votes
2 answers

Neo4j.rb - index paginated with Kaminari too slow

Here is my controller (index is sorted): def index if params[:limit] @bisacs = Bisac.order(:bisac_code).page(params[:page]).per(params[:limit]) else @bisacs = Bisac.order(:bisac_code).page(params[:page]) end end Here are…
LDB
  • 692
  • 6
  • 18
3
votes
0 answers

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: …
Rahul Dess
  • 2,397
  • 2
  • 21
  • 42
3
votes
1 answer

How to select all from multiple kaminari pages

I am using Kaminari for paging in my rails application. I need to select all for items on the current page or every page. The current page is rather simple bundle how can I select all the items on other pages. file_items_controller.rb def index …
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
3
votes
0 answers

What's the state-of-the-art for pagination with Sequel and Rails 4?

I have a Rails-API app using Sequel which needs pagination. I've come across a few options but have ran into problems with each of them. kaminari looks great, but appears to have no Sequel support. will_paginate appears to have Sequel support, but…
Schwern
  • 153,029
  • 25
  • 195
  • 336
3
votes
1 answer

Ransack with kaminari on rails 4.1 error with empty search string

I am using Ransack simple search with kaminari for pagination successfully on rails 4.0.4. I have upgraded rails with this project to 4.1.0, which is the only change, and now if I search without entering any inputs in the search form I get:…
3
votes
0 answers

Kaminari link_to_next_page and link_to_previous_page from a service client

I have a service that uses kaminari for pagination. The index controller action for the service looks like this. respond_to :json, xml def index if params[:query].present? @search = Product.search_for(params[:query], load: true) else …
Optimus Pette
  • 3,250
  • 3
  • 29
  • 50
3
votes
0 answers

Infinite scrolling in Kaminari

I'm using Kaminari for pagination. And here is the code which i'm using for infinite scroll: jQuery(function() { if ($('.pagination').length) { $(window).scroll(function() { var url; url = $('.pagination…
3
votes
1 answer

Filtered Pagination with Kaminari

I set up a website that uses AJAX-pagination powered by Kaminari. I also have set up simple filtering and searching, so you can browse my list on http://example.com/products/filter?query=blah. I'm using Kaminari's built-in link_to_next_page helper…
AlexQueue
  • 6,353
  • 5
  • 35
  • 44
3
votes
1 answer

Rails Kaminari pagination error with Ransack

I am Using Ransack with Kaminari - My Controller is: def index @q = Household.search(params[:q]) @households = @q.result end The relevant part of my view: - @households.each do |household| %tr %td= link_to…
tbrooke
  • 2,137
  • 2
  • 17
  • 25