This gem integrates the MaterializeCSS pagination component with the will_paginate pagination gem.
Add this line to your application's Gemfile:
gem 'will_paginate-materialize'
And then execute:
$ bundle
Or install it yourself as:
$ gem install will_paginate-materialize
- Install Materialize-sass (if you haven't already)
- Add the following to your application.scss file
.pagination li.active a {
color: #fff;
}
- Add the following into your HEAD. This loads the Google Material design Icon fonts.
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
You're done! Use the will_paginate helper as you would otherwise.
<%= will_paginate @collection %>
Bug reports and pull requests are welcome on GitHub at https://github.com/patricklindsay/will_paginate-materialize. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
- Add specs
The gem is available as open source under the terms of the MIT License.