Kaminari bootstrap, kaminari

generate Kaminari files :

rails g kaminari:config

As Kaminari’s paginating scope is just an ordinal AR scope, you can do that in quite natural way.

Book.order('published_at').page(3).per(10)

Of course default_scope works great with Kaminari for this purpose.

class Book < ActiveRecord::Base
  default_scope order('published_at')
end

see friendly url

resources :my_resources do
  get 'page/:page', :action => :index, :on => :collection
end

views :

rails g kaminari:views default -e haml

see bootstrap adaptation

adapt to bootstrap

Generate view and replace %span by %ul and %li, and in current page, replace link_to_unless by link_to.


comments powered by Disqus