Hooks into will_paginate to format the html to match Twitter Bootstrap 4 styling
Clone or download
delef Merge pull request #6 from RogerE/patch-1
Change README#Usage structure
Latest commit 2c15583 Nov 14, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config/initializers Update will_paginate.rb Jan 10, 2018
lib Update version.rb Jan 10, 2018
.gitignore first commit Sep 28, 2016
Gemfile first commit Sep 28, 2016
LICENSE.md add license Sep 29, 2016
README.md Change README#Usage structure Nov 14, 2018
Rakefile first commit Sep 28, 2016
will_paginate-bootstrap4.gemspec drop rdoc config from the gemspec Sep 29, 2016

README.md

Will Paginate link renderer styles for Twitter Bootstrap 4

ex

Rails Engine that extends will_paginate stylings to match the pagination styling conventions in Twitter's Bootstrap 4 toolkit.

Installation

Add to your Gemfile:

gem 'will_paginate-bootstrap4'

Usage

<%= will_paginate @clients, renderer: WillPaginate::ActionView::BootstrapLinkRenderer %>

The following options are available (in addition to the options available in will_paginate):

:list_classes = ['pagination']    # Array of classes
:aria_label = 'Page Navigation'   # The aria label to use in the Nav tag
:previous_label = '&laquo;'       # Previous page label
:next_label = '&raquo;'           # Next page label

For example, to place the navigation section to the far right of the page, use this in your view:

<%= will_paginate @clients, list_classes: %w(pagination justify-content-end) %>

Just like you would in the regular will_paginate. If you've got a need to use the default will_paginate stylings, pass an option like so:

<%= will_paginate @collection, renderer: WillPaginate::ActionView::LinkRenderer %>

Copyright (c) 2016-2018 Ivan Palamarchuk released under the MIT license