- changed dependency from will_paginate to kaminari
- handle params to paginate as Hash with indifferent access
- Decide through table definition if a given paginable param is a scope or a attribute to query
- Symbolize params to build pagination
- added options hash which will be forwarded to will_paginate
- Rails 3 compatibility.
- Separated scope chaining from invokation of paginate. This allows you to invoke further methods on the chained scope such as:
Bill.chain_scopes(params, per_page).sum("billing_positions.amount")
So
Bill.atq_paginate(params, per_page).paginate
is now defined as:
chain_scopes(:page => params[:page], :per_page => per_page).paginate(:page => params[:page], :per_page => per_page)
- Now supports params[:order] passed to the corresponding named_scope
- named_scope “order” to be able to order records like this:
MyClass.scoped_by_attr.order("id DESC")