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
0 answers

kaminari automatically adds

I have tried adding list-style-type: decimal inside the CSS, but somehow it still didn't change. So I think the kaminari's paginate method cannot be forced by CSS. Anyone knows how to fix this?
Kittichote Chain
  • 596
  • 1
  • 10
  • 22
0
votes
1 answer

How to set up kaminari correctly

I'm using kaminari gem for pagination. The problem is that I need to paginate on the first page after 4 elements, and on the all other pages after 25 elements. It it possible to configure kaminari to solve my problem? Here is a usage: .pagination …
Damir Nurgaliev
  • 341
  • 5
  • 19
0
votes
2 answers

Multiple IF statements in Rails 5 Controller

I am trying to use two if statements within my index. The first allows the user to view by tags, and the second defines the Kaminari pagination gem, gem 'kaminari'. The problem is, I can't get both to work. With the code as is below, the pagination…
Simon Cooper
  • 1,574
  • 4
  • 24
  • 53
0
votes
1 answer

Why does .order doesn't get executed in my query?

I have slightly modified version for Kaminari to find on which page my record is (original code is here: https://github.com/kaminari/kaminari/wiki/FAQ#how-can-i-know-which-page-a-record-is-on): module KaminariHelper extend ActiveSupport::Concern …
ExiRe
  • 4,727
  • 7
  • 47
  • 92
0
votes
0 answers

kaminaris url generated is not relative url

I pust a kaminari url in controller facilator , action index I put viewer helper in as <%= paginate @sessions %> but the link it generated is http://localhost:3000/?page=2 the link i want would be http://localhost:3000/facilator/index?page=2 How…
Jimmy Lynn
  • 65
  • 6
0
votes
0 answers

Rails and Kaminari using Ajax

I have a pagination on a page using Kaminari and Ajax, but actually, when I click 'next' button or a number of the pagination, I haven't result and the url is doesn't updated. If I click on '2' I want my url being…
Antonin Mrchd
  • 656
  • 3
  • 9
  • 31
0
votes
1 answer

Kaminari: Multiple paginations on a page, indexing and canonical

In my ruby on rails app, I'm showing multiple paginated items on a single page. For a single items pagination, I know how to use pagination and rel='prev' and 'next' attributes and canonical. But in my case, there can be multiple permutations and…
lightsaber
  • 1,481
  • 18
  • 37
0
votes
2 answers

How to setup a controller's routes when it doesn't match the name

I want to have the url /community so here is what I did. I created the controller: CommunitiesController and have this in my routes: get 'community' => 'communities#index' Did I set this up incorrectly? The problem I'm having is I now want to add…
AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012
0
votes
1 answer

How to use Kaminari in an ActiveRecord dependent Gem that does not necessarily use Rails

I have a ruby gem that houses ActiveRecord models that are shared across multiple apps. This gem also contains several other shared classes that work with the models. One of these classes uses Kaminari, but when I put it in the gem, all tests failed…
mindtonic
  • 1,385
  • 2
  • 14
  • 24
0
votes
1 answer

Paginate multiple models with Ajax & Params

In my app I allow users to like item/cover object which they can later view in their profile. I have a profile model that shows a list of items and covers in separate tabs. A user clicks on a link to selects which list to view, which sends the…
0
votes
1 answer

Kaminari params on first page config option

I am trying to set this option to true as described in the documentation. I used rails g kaminari:config which generated the following kaminari_config.rb : Kaminari.configure do |config| # config.default_per_page = 25 # config.max_per_page =…
V. Déhaye
  • 493
  • 6
  • 20
0
votes
1 answer

Rails 4.2 with Kaminari 0.17.0 - how to change "?page=x" to "/x" (ie no query string)

Whilst I understand that Tim Berners Lee specified the use of ? for dynamic url segments, the client on my project doesn't want them. So does anyone know how, using Kaminari for paging, I can change the routing to…
rmcsharry
  • 5,363
  • 6
  • 65
  • 108
0
votes
1 answer

Kaminari and Elasticsearch NoMethodError Rails

I have one error with Kaminari and Elasticsearch on rails app. I am unable to find the problem. I think my mistake is in my controller. By the way I am using active-admin for administrate my app. undefined method `page' for…
0
votes
0 answers

Which page a record is on?

I want to have my pager start on the page for a given record and be able to page through the records before and after in the collection. i get the code from here https://github.com/amatsuda/kaminari/issues/205 and its working when i put <%=…
anouar
  • 125
  • 1
  • 1
  • 10
0
votes
2 answers

Ruby on rails - Kaminari - Paginate array of search results

I have a search form with pagination. Both things work OK separately, but if I search and then load the next page, the search parameters are forgotten and kaminari shows results regardless of what search options I selected. I have read through the…
Rob Hughes
  • 876
  • 2
  • 13
  • 32