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
0
votes
1 answer

Ruby on rails - Load more button with kaminari and search form. Jquery problems

I have an ajax search form and ajax pagination using kaminari. I would like to change this into a 'load more' button but I'm having trouble with the jquery. For the form and normal pagination I was using this in my index.js.erb…
Rob Hughes
  • 876
  • 2
  • 13
  • 32
0
votes
1 answer

Rails Grape API pagination with AMS and custom JSON

Doing in Rails what may require a more complex/creative solution, but basically using Grape, active_model_serializers (AMS), and grape-kaminari to return an index route (list) of User objects, and I'd like to be able to use the advantages of AMS…
0
votes
1 answer

Rails & Kaminari: pagination gives me duplicates

I am using the gem Kaminari with AJAX. The AJAX part is working fine. However, when I say in my controller .per(3) it returns me every object times 3. So when I have 9 recipes, it returns me 27 recipes (making duplicates). I only get unique objects…
Seifer
  • 247
  • 3
  • 10
0
votes
1 answer

Can't get kaminari to show root node or meta data

Rails 4.1.4 Ruby 2.2.0 What I want: { playlists: [ { id: 2, name: "First MySQL Playlist", } ], meta: { current_page: 1 } } What I'm getting: [ { id: 2, name: "First MySQL Playlist", } ] I've done this many many…
AthleteInAction
  • 435
  • 4
  • 14
0
votes
1 answer

Filtering models with pagination only filters first page - rails 3

I have a model which I am filtering based on some parameters given by the user. The filtering works just fine but once I start using pagination, only the records from the first page are filtered and the others are ignored. This is my code…
Kupi
  • 903
  • 1
  • 10
  • 16
0
votes
1 answer

Can/how do i add a spinner animation during the ajax request

I am very new to jquery and trying to figure out if I am able to add a spinner to use in conjunction with Kaminari I have pagination of 200 Contacts with code below. <%= paginate contacts, remote: true, params: { :controller => "contacts", :action…
user2970050
  • 307
  • 2
  • 16
0
votes
0 answers

Moving to Next User in Pagination after Submit Button is Clicked

I know this question has been asked several times, but there is one thing that I cannot follow. I am trying to move to the next user in my Kaminari pagination after a form is submitted. I have the code working where it will increment the page, but…
user3376654
  • 67
  • 1
  • 9
0
votes
1 answer

Using Paginate Directly after Submission

I am creating an evaluation form where a user will submit form after form by using kaminari pagination. The way I have it set up right now though is that the user will answer the questions, submit the form with an f.submit button, then once the…
user3376654
  • 67
  • 1
  • 9
0
votes
2 answers

Using Paginate on Certain Users in Database

I am using Kaminari Paginate to traverse through users and give them an evaluation. However, certain users can only evaluate certain users, not all of them, but I am confused on how to go about this. I tried creating an array of the users I want to…
user3376654
  • 67
  • 1
  • 9
0
votes
0 answers

Spree infinite scroll not working

I have followed stackoverflow spree infinite scroll but still my infinite scroll is not working I am posting required files please help as I am new to spree platform assets/javascripts/spree/frontend/xyz.coffee jQuery -> if…
Sumeet Masih
  • 597
  • 1
  • 8
  • 22
0
votes
1 answer

Pagination not working only with a certain query

I am using Kaminari gem to paginate using ajax i have three paginations on the same page @all_questions = Question.where.not(id: current_user.question_ids).page(params[:unanswered]).per(1) @wrong = Tracker.where("user_id = ? AND correct =…
Petros Kyriakou
  • 5,214
  • 4
  • 43
  • 82
0
votes
2 answers

pagination with kaminari and mongoid

I have this problem undefined method `total_pages' for # # controller @services = Service.paginate(:page => params[:page], :per_page => 3) # view <% paginate @services %> The mongo doesn't return the object.
0
votes
1 answer

Rails 4, Kaminari and Filterrific issue after first page

I have this issue in rails 4, I have a list paginated using the gem kaminari, with a filter by name using the gem filterrific. When the page just loaded everything works fine, but after I move to another page the filter doesn't work unless I click…
0
votes
1 answer

How do I Override pagination links generated by active_model_serializers

I want to override the Pagination links generated by the active_model_serializers in association with kaminari. How do I achieve this, there is no information on this page about overriding Moreover, the links generated are in this order>> {"self",…
Vipin Verma
  • 5,330
  • 11
  • 50
  • 92
0
votes
1 answer

page[size] getting updated from 10 to 1 when user lands on a page with only 1 result

#app/serializers/admin_serializer.rb class AdminSerializer < ActiveModel::Serializer attributes :id, :email, :access_locked? end #app/controllers/dashboard/admins_controller.rb def index @search = Admin.search(params[:q]) if…
Vipin Verma
  • 5,330
  • 11
  • 50
  • 92