All Projects → mislav → Will_paginate

mislav / Will_paginate

Licence: mit
Pagination library for Rails, Sinatra, Merb, DataMapper, and more

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Will paginate

Dawnscanner
Dawn is a static analysis security scanner for ruby written web applications. It supports Sinatra, Padrino and Ruby on Rails frameworks.
Stars: ✭ 642 (-88.58%)
Mutual labels:  rails, sinatra
Rack Policy
Rack middleware for the EU ePrivacy Directive compliance in Ruby Web Apps
Stars: ✭ 149 (-97.35%)
Mutual labels:  rails, sinatra
Redis dashboard
Sinatra app to monitor Redis servers.
Stars: ✭ 141 (-97.49%)
Mutual labels:  rails, sinatra
Ununiga
[은는이가] 한글 조사(助詞) 대응 I18n engine extension
Stars: ✭ 34 (-99.4%)
Mutual labels:  rails, plugin
Rack Reducer
Declaratively filter data via URL params, in any Rack app, with any ORM.
Stars: ✭ 241 (-95.71%)
Mutual labels:  rails, sinatra
Vite ruby
⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience
Stars: ✭ 112 (-98.01%)
Mutual labels:  rails, plugin
Recaptcha
ReCaptcha helpers for ruby apps
Stars: ✭ 1,819 (-67.64%)
Mutual labels:  rails, sinatra
Daru View
daru-view is for easy and interactive plotting in web application & IRuby notebook. daru-view is a plugin gem to the existing daru gem.
Stars: ✭ 65 (-98.84%)
Mutual labels:  rails, sinatra
Bugsnag Ruby
Bugsnag error monitoring & reporting software for rails, sinatra, rack and ruby
Stars: ✭ 211 (-96.25%)
Mutual labels:  rails, sinatra
Draftsman
Ruby gem that lets you create draft versions of your database records.
Stars: ✭ 159 (-97.17%)
Mutual labels:  rails, sinatra
Simple Navigation
A ruby gem for creating navigations (with multiple levels) for your Rails, Sinatra or Padrino applications. Render your navigation as html list, link list or breadcrumbs.
Stars: ✭ 868 (-84.56%)
Mutual labels:  rails, sinatra
Pluck to hash
Extend ActiveRecord pluck to return array of hashes
Stars: ✭ 275 (-95.11%)
Mutual labels:  rails, sinatra
Config
Easiest way to add multi-environment yaml settings to Rails, Sinatra, Pandrino and other Ruby projects.
Stars: ✭ 1,821 (-67.6%)
Mutual labels:  rails, sinatra
Timber Ruby
🌲 Great Ruby logging made easy.
Stars: ✭ 154 (-97.26%)
Mutual labels:  rails, sinatra
sinator
Sinatra application generator
Stars: ✭ 19 (-99.66%)
Mutual labels:  sinatra, sequel
Pagy
🏆 The Best Pagination Ruby Gem 🥇
Stars: ✭ 3,340 (-40.58%)
Mutual labels:  rails, sinatra
Calendar
微信小程序日历插件
Stars: ✭ 631 (-88.77%)
Mutual labels:  plugin
Mobility
Pluggable Ruby translation framework
Stars: ✭ 644 (-88.54%)
Mutual labels:  rails
Guides
Article back-end for hack.guides() website
Stars: ✭ 628 (-88.83%)
Mutual labels:  rails
Osem
Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.
Stars: ✭ 649 (-88.45%)
Mutual labels:  rails

will_paginate

will_paginate is a pagination library that integrates with Ruby on Rails, Sinatra, Hanami::View, Merb, DataMapper and Sequel.

gem 'will_paginate', '~> 3.3'

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

Basic will_paginate use

## 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].