This gem integrates the Twitter Bootstrap pagination component with the will_paginate pagination gem.
As with will_paginate itself, Rails and Sinatra are supported.
gem install will_paginate-bootstrap
, or- For projects using Bundler, add
gem 'will_paginate-bootstrap'
to yourGemfile
(and then runbundle install
).
- Load the Bootstrap CSS in your template.
- In your view, use the
renderer: BootstrapPagination::Rails
option with thewill_paginate
helper, for example:
<%= will_paginate @collection, renderer: BootstrapPagination::Rails %>
- Load the Bootstrap CSS in your template.
require "will_paginate-bootstrap"
in your Sinatra app.- In your view, use the
:renderer => BootstrapPagination::Sinatra
option with thewill_paginate
helper, for example:
<%= will_paginate @collection, renderer: BootstrapPagination::Sinatra %>
Ruby | >= 1.9.2 |
---|---|
will_paginate | >= 3.0.3 |
Bootstrap | >= 2.0.0 |