Skip to content

will_paginate enhancement to automatically receive a filterable pagination method.

License

Notifications You must be signed in to change notification settings

avarteq/acts_as_paginable

Repository files navigation

acts_as_paginable

Motivation

Use and chain scoped_by methods in conjunction with will_paginate to create a filterable and paginable record list.

Requirements

  • Ruby on Rails
  • will_paginate

Usage

acts_as_paginable(:scopes => [ :attribute1, :attribute2 ])
params = { "bills_id" => "10", "customer_id" => "3", :page => "4"}
MyModel.atq_paginate(params, 10)

Results in

MyModel.scoped_by_bills_id("10").scoped_by_customer_id("3").paginate(:page => "4", :per_page => "10")

About

will_paginate enhancement to automatically receive a filterable pagination method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages