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
2
votes
3 answers

Temporarily disable Kaminari pagination in Spree

I'm making a Spree site that has links for changing the number of products per page including a link for All. The links for a number are easy because I can just pass a :per_page param via the query string and helper methods. However, I can't…
Yogh
  • 591
  • 6
  • 17
2
votes
1 answer

Rails Kaminari Pagination using Ajax

I'm having troubles paginating using Ajax. My View code looks for pagination looks like = paginate @products, :remote => true However, the AJAX call fails with error status code and Web Inspector shows it as seen below The server logs show ERROR…
membLoper
  • 1,972
  • 19
  • 21
2
votes
0 answers

Infinite Scrolling Sunspot With Kaminari Gem and Rails 3.1

I am trying run this infinite scroll but for me not working fine. https://github.com/amatsuda/kaminari/wiki/How-To:-Create-Infinite-Scrolling-with-jQuery I am using sunspot with kaminari gem that paginate fine the results. But when I trying create…
hyperrjas
  • 10,666
  • 25
  • 99
  • 198
2
votes
3 answers

Error with Kaminari pagination in Rails 3

I'm trying to implement pagination in my Rails 3 app with Kaminari but I'm getting the following error: undefined method `page' for # This is what I have in my controller: @stories = Story.find_all_by_keynote_id(@keynote,…
Felipe Cerda
  • 480
  • 1
  • 5
  • 20
2
votes
1 answer

Pagination does not work after Ajax call in Rails

I am using plugin Kaminari for pagination. I am Ajaxifing my application and I encountered a problem. I have a form with paginated data plus form for filtering data (both via Ajax). At start pagination works good, and the url's for particular pages…
Dedemonn
  • 128
  • 10
2
votes
0 answers

Rails3.1 infinite/endless scroll

I want to make my project's feed_item go endless, I am using kaminari in Rails, can anyone suggest a good way to implement infinite/endless scroll rather than this:…
Jason
  • 371
  • 1
  • 4
  • 7
2
votes
0 answers

Resque hates kaminari dsl method paginates_per

So I'm converting my Admin mailers to use Resque and execute in the background. When I ran: rake resque:work QUEUE='*' --trace I get this: $ rake resque:work QUEUE='*' --trace (in /my/directory) ** Invoke resque:work (first_time) ** Invoke…
Michael K Madison
  • 2,242
  • 3
  • 21
  • 35
2
votes
1 answer

Error with Kaminari pagination

I would like to paginate my objects with the Kaminari pagination gem. I have this line in my controller: @products = Product.order("id").find_all_by_id(params[:id]) That line in my view: <%= paginate @products %> And that line in my…
TW147
  • 561
  • 2
  • 7
  • 20
2
votes
2 answers

Rails Pagination with Kaminari with has_many :through Relationship

I have three relevant models. A User which has_many :photos and belongs_to :dorm, a Dorm which has_many :users and has_many :photos, :through => :users, and a Photo class which belongs_to :users and belongs_to :dorm. I want to paginate all the…
Rymo4
  • 461
  • 2
  • 7
  • 15
2
votes
2 answers

How to customise the Kaminari URL to include only certain parameters?

I am currently using kaminari for pagination in my project. The url getting generated contains the other parameters as well in addition to the page parameter. For example, I am using the following to generate my next page…
mangom
  • 467
  • 1
  • 3
  • 20
2
votes
1 answer

Rails3 - Sort and Paginate with Kaminari + AJAX + unobtrusive javascript

I have successfully set up an ajax pagination with Kaminari. In order to add a sort feature I followed this great Railscast and replaced will_paginate by Kaminari. The pagination works great but the sort works just the first time because the…
2
votes
2 answers

For Ruby on Rails, how do you use will_paginate or Kaminari when the data is fetched from an API? (over the net)

It seems like will_paginate and Kaminari are both very tied into ActiveRecord? If the data is obtained through an API, such as http://www.foo.com/fetch_data?type=products&offset=100&count=20 then how can you use will_paginate or Kaminari to do the…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
2
votes
2 answers

Rails eager loading and kaminari

How to use eager loading while paginating with kaminari? I know that kaminari needs Relation object to work, how to retrieve models with :include and return Relation object? And second question, why :include creates sql query for evry defined model…
methyl
  • 3,272
  • 2
  • 25
  • 34
2
votes
3 answers

Kaminari pagination is only returning the first 25 results not all of them

I am trying to cache requests that come in for Products. I am using the Kaminari gem for pagination but for some reason I cannot see all the products on my view page. It seems to only take the top 25 and list those. def index cache_key =…
syed zaidi
  • 127
  • 1
  • 10
2
votes
1 answer

Rails 5: Kaminari gem with ajax setup

I have already installed the kaminari gem and it's working fine with my rails 5 app. On a page where I have the comments I'm trying to implement the pagination via Ajax and thus without refreshing the page. The comments are located inside panel with…
Theopap
  • 715
  • 1
  • 10
  • 33