No commit activity in last 3 years
No release in over 3 years
Filter records by passing params to a controller. No need to modify the model anymore.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

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")