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

using delete_if to find conversations using mailbox and then paginate using kaminari

I'm trying a couple things to find conversations where not all messages have been deleted and it's not working. Here's one implamentation: def index @conversations = @mailbox.conversations.delete_if do |c| receipts = c.receipts_for…
monty_lennie
  • 2,871
  • 2
  • 29
  • 49
0
votes
1 answer

How to clone a repository with unmerged pull request

I want to clone a repository with unmerged pull request. Specifically, kaminari_themas with this pull request for zurb-foundation is what I need. How can I clone it?
ironsand
  • 14,329
  • 17
  • 83
  • 176
0
votes
1 answer

Kanimari Pagination with custom routes and ajax

I am trying to update a pagination div through the remote call in the Kanimari gem. Since this is going though ajax, I want to send it to a custom controller so I am only updating one div, instead of the entire page. Unfortunately, this is the…
CorreyS
  • 2,433
  • 3
  • 15
  • 16
0
votes
2 answers

Pagination error in gem kaminari?

I am working on rails 4 and this are my steps:- gem kaminari --in gemfile bundle install @vendors = Vendor.order(:name).page params[:page] in vendor_controller.rb) also tried @vendors=Vendor.order("name").page(params[:page]).per(5) <% = paginate…
0
votes
1 answer

`default_scope order('created_at DESC')` works, but `Model.order('created_at DESC')` doesn't work with kaminari

I'm using kaminari for pagination in rails. if I set default_scope order("created_at DESC") in model, it works as expected. But when I write in controller like this, the DESC is ignored and pages are ordered by ascendent. (In this case I don't write…
ironsand
  • 14,329
  • 17
  • 83
  • 176
0
votes
1 answer

Rails 4 ajax refreshes partial only after submitting form twice

I am new to rails and have been working on a simple twitter like site. In my tweets page when the New Tweet form(with ajax) is filled and submitted once the partial (displaying the tweets) doesn't change, on clicking submit again the partial…
0
votes
1 answer

kaminari friendly URLs and rails url

courses_path This path generate a url: http://localhost:3000/courses With friendly urls: resources :courses, :only => [:index] do get 'page/:page', :action => :index, :on => :collection end When I want paginate many courses, the urls output is…
hyperrjas
  • 10,666
  • 25
  • 99
  • 198
0
votes
1 answer

Having Trouble With Kaminari Gem

I'm trying to paginate multiple tables with the Kaminari Gem. I've tried to do this by generating an array in my application controller, like so: @paginate = %w(errors messages subscribers).page(params[:page]).per(15) I've then taken @paginate and…
Joe Hilton
  • 261
  • 1
  • 4
  • 13
0
votes
1 answer

Kaminari paginates_per with Mongoid doesn't work

My model is like this. I'm using Kaminari with Mongoid and set the default per page results. class SavedTweet include Mongoid::Document field :slug, :type => String field :created_at, :type => DateTime, :default…
toy
  • 11,711
  • 24
  • 93
  • 176
0
votes
1 answer

Append #divId to url in kaminari pageination links

I wan to add #divId to the url in kaminari pagination links so that i can navigate to specific portion of the page. How can I achieve that? Thanks in Advance
jbmyid
  • 1,985
  • 19
  • 22
0
votes
0 answers

How to paginate mongoid reference collection from kaminari?

I have two collections which I want to paginate through the referenced collection. class Col1 include Mongoid::Document field :slug, :type => String field :created_at, :type => DateTime has_many :col2, …
toy
  • 11,711
  • 24
  • 93
  • 176
0
votes
1 answer

Ajax pagination like twitter with kaminari

Now I am trying to set up ajax pagination like twitter with kaminari. I got an error message and I have no idea how to solve this. What should I do to make it work? ☆error message NoMethodError at /members undefined method `last_page?' for…
Kuniharu Aramaki
  • 371
  • 1
  • 3
  • 14
0
votes
1 answer

pagination like twitter with kaminari

Now I am trying to set up ajax reloading pagination system like twitter with kaminari. But I got an error message. Could you give some advice? ☆error message ActionController::RoutingError at /members undefined method `paginates_per' for…
0
votes
1 answer

After ajax request will_pagenate doesn't work

I'm using ajax request to update my lists. And the lists are shown with will_paginate. Before ajax post it works all fine. The original pagination url is like /users/username?page=2. After posting to url users/update_lists_from_twitter for refresh…
ironsand
  • 14,329
  • 17
  • 83
  • 176
0
votes
1 answer

Rails 4 with kaminari. I need absolute urls in paginate

kaminari seems to build url and ignored config.action_controller.default_url_options = { :host => "localhost" } config.action_mailer.default_url_options = { :host => "localhost" } config.action_controller.asset_host ="localhost" is there a way to…
devanand
  • 5,116
  • 2
  • 20
  • 19