padorina で will_paginateを bootstrap と使う
will_paginate
https://github.com/mislav/will_paginate/ にあるとおりインストールその他。
% padrino g plugin will_paginate
bootstrap と合わせるには、https://gist.github.com/phildionne/5785087 を lib/will_paginate_bootstrap_renderer.rb あたりにセーブして、config/boot.rb で require する。
% vi app/controllers/entry.rb ... entries = Entry.paginate(page: params[:page], per_page: 5).order("created_at desc") content_for(:pagination, will_paginate(entries, renderer: WillPaginate::ViewHelpers::BoostrapLinkRenderer, previous_label: "«", next_label: "»")) haml :index, locals: {entries: entries} ... % vi app/views/index.haml - entries.each do |entry| = haml :show, :layout => false, locals: {entry: entry} = yield_content(:pagination)
とかしてあげる。
参考
Ruby - padrino+will_paginate+bootstrap向けにカスタムレンダラを実装 - Qiita : http://qiita.com/insight3110/items/d513aeaeac32552c3c9a
ただしここの最後にある変更はする必要がない。