Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Kaminari | 8,387 | 45,105 | 617 | 8 days ago | 54 | December 25, 2021 | 62 | mit | Ruby | |
⚡ A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Ruby webapps | ||||||||||
Will_paginate | 5,684 | 44,800 | 511 | 4 days ago | 38 | August 12, 2021 | 39 | mit | Ruby | |
Pagination library for Rails and other Ruby applications | ||||||||||
Pagy | 4,114 | 130 | 35 | 4 days ago | 147 | February 03, 2022 | 5 | mit | Ruby | |
🏆 The Best Pagination Ruby Gem 🥇 | ||||||||||
Api Pagination | 653 | 329 | 14 | 2 years ago | 32 | October 26, 2021 | 23 | mit | Ruby | |
:page_facing_up: Link header pagination for Rails and Grape APIs. | ||||||||||
Wice_grid | 531 | 208 | 5 | 5 years ago | 45 | November 29, 2018 | 45 | mit | Ruby | |
A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters | ||||||||||
Order_query | 490 | 7 | 1 | a year ago | 16 | December 16, 2021 | 4 | other | Ruby | |
Find next / previous Active Record(s) in one query | ||||||||||
Jsonapi.rb | 211 | 4 | 1 | 5 months ago | 27 | February 17, 2021 | 14 | mit | Ruby | |
Lightweight, simple and maintained JSON:API support for your next Ruby HTTP API. | ||||||||||
Bootstrap Helper | 201 | 233 | 7 years ago | 19 | December 24, 2013 | 18 | Ruby | |||
Twitter Bootstrap Helper for Rails, support will_paginate & simple_form template | ||||||||||
Tog | 129 | 1 | 13 years ago | 11 | August 10, 2014 | 1 | mit | Ruby | ||
Base gem that bootstrap tog platform configuration in a Rails app | ||||||||||
Dry_scaffold | 125 | 13 years ago | 15 | August 11, 2014 | 16 | mit | Ruby | |||
Rails: A Rails scaffold generator that generates DRYer, cleaner, and more useful code. IMPORTANT: Not maintained anymore. |
will_paginate is a pagination library that integrates with Ruby on Rails, Sinatra, Hanami::View, and Sequel.
gem 'will_paginate', '~> 4.0'
See installation instructions on the wiki for more info.
ℹ️ will_paginate is now in maintenance mode and it will not be receiving new features. See alternatives
## perform a paginated query:
@posts = Post.paginate(page: params[:page])
# or, use an explicit "per page" limit:
Post.paginate(page: params[:page], per_page: 30)
## render page links in the view:
<%= will_paginate @posts %>
And that's it! You're done. You just need to add some CSS styles to make those pagination links prettier.
You can customize the default "per_page" value:
# for the Post model
class Post
self.per_page = 10
end
# set per_page globally
WillPaginate.per_page = 10
New in Active Record 3:
# paginate in Active Record now returns a Relation
Post.where(:published => true).paginate(:page => params[:page]).order('id DESC')
# the new, shorter page() method
Post.page(params[:page]).order('created_at DESC')
See the wiki for more documentation. Report bugs on GitHub.
Happy paginating.