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

How config url in Kaminari pagination? '.json' appended automatically

Load table with Kaminari pagination using AJAX. The pagination itself is using AJAX as well. In my controller: def update_user_list modal = render_to_string('tables/_user_table', :layout => false, :formats=>[:html]).html_safe data = { :table…
Logan W
  • 139
  • 1
  • 2
  • 10
0
votes
1 answer

ruby `stack level too deep error` when trying to user order param

I'm trying to add a sort_by params to a rails app that uses Kaminari for paging. When add the param to the query I get a stack level too deep error. app/controllers/file_items_controller.rb class FileItemsController < AccountsController def index …
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
0
votes
1 answer

Custom page number Kaminari gem

I am using Kaminari gem with my rails 3.2 application. Its working fine. Now i want to add a custom page number text field where user can provide a page number and by hitting return key should load the required page number. What is the best approach…
Arif
  • 1,369
  • 14
  • 39
0
votes
1 answer

In Rails when using AJAX, how to change the js file it loads?

For example, I use data remote for the pagination like this : <%= paginate @products, :remote => true %> It works. But the problem is I have multiple lists to paginate in one page. So, I need a way to send the call to a separate files so I can…
THpubs
  • 7,804
  • 16
  • 68
  • 143
0
votes
1 answer

Pagination with CanCan block

With will_paginate or Kaminari you can paginate with scopes and CanCanCan. Explained here, How to do pagination with cancan? But that only explains how to do it if your CanCan ability uses hashes. That won't work if you use a block. Which I…
bfcoder
  • 3,042
  • 2
  • 28
  • 35
0
votes
1 answer

How to add custom URLs

How to add custom URLs like localhost:3000/one_hour/page/2 instead of localhost:3000/one_hour?page=2 to get '/one_hour', to: 'feed_entries#one_hour' I use Rails 4, Kaminari and mongoid routes.rb Rails.application.routes.draw do concern…
Anton Ipatov
  • 169
  • 2
  • 14
0
votes
1 answer

How to add pagination in Kaminari

How to add pagination to feed_entries in category? I use kaminari, mongoid 4, rails 4 Category.rb class Category def feed_entries FeedEntry.in(source_id: sources.map(&:id)) end end show.html.erb <%…
Anton Ipatov
  • 169
  • 2
  • 14
0
votes
1 answer

How to fix Kaminari paginate error in view?

When I use Kaminari gem with the code: Model: def index @posts = Post.page(params[:page]) end And use it in index.html.erb: It prints the next error: undefined method `paginate' for #<#:0x000000029b3dc0> red line on <%=…
Sarkhan
  • 269
  • 1
  • 2
  • 9
0
votes
1 answer

Rails 4, how to ordering using custom method

I want to order the Conversation model, using a custom method. I found some solution: How do you order by a custom model method that has no attribute in SQL? and…
kai
  • 492
  • 3
  • 18
0
votes
1 answer

Choosing how many results per page through drop down menu

I use the kaminari pagination gem. I can restrict the results per page to 6. This is an example of my pagination in my products_controller: def index @products = Product.order(:title).page(params[:page]).per(6) end But rather than hard coding the…
user4227507
0
votes
1 answer

Heroku will not render 'paginate.render' correctly

I'm using kaminari, everything works fine locally. On heroku, any code written inside the standard kaminari paginator.render block is not getting rendered. consider <%= paginator.render do %>

this is the paginator

John
  • 1,246
  • 15
  • 34
0
votes
1 answer

Endless scrolling stops working after generating theme

I've been following #114 Endless Scrolling Railscast (http://railscasts.com/episodes/114-endless-page-revised) and I've gotten the endless scrolling feature to work with Kaminari. However, when I generated the theme for Foundation the endless…
0
votes
0 answers

Kaminari error - undefined method `<' for nil:NilClass

I'm facing a problem with Kaminari paginate. This is the code: <% table %> ... <% @usuarios.each do |usuario| %> <%= render partial: "admin/redes/redes/usuarios_rede", locals: {usuario_rede: usuario} %> <% end…
MDayrell
  • 63
  • 1
  • 8
0
votes
1 answer

grape-kaminari with grape-builder

Is there a way to get this grape-kaminari to work alongside the grape-jbuilder gem? I've tried just paginating the records in the actual API module endpoint: resource :groups do desc "Return a list of groups belonging to your company." get…
JonathanSimmons
  • 1,528
  • 1
  • 16
  • 28
0
votes
1 answer

Kaminari pagination error in spree

Here is the error: NoMethodError - undefined method `current_page' for 30:Fixnum: kaminari (0.15.1) lib/kaminari/helpers/action_view_extension.rb:18:in `paginate' ()…
Abram
  • 39,950
  • 26
  • 134
  • 184