Module: WillPaginate::Finder
- Defined in:
- lib/will_paginate/finder.rb
Overview
A mixin for ActiveRecord::Base. Provides per_page
class method and hooks things up to provide paginating finders.
Find out more in WillPaginate::Finder::ClassMethods
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/will_paginate/finder.rb', line 10 def self.included(base) base.extend ClassMethods class << base alias_method_chain :method_missing, :paginate # alias_method_chain :find_every, :paginate end base.class_inheritable_accessor :per_page base.class_inheritable_accessor :max_per_page base.write_inheritable_attribute :per_page, 30 base.write_inheritable_attribute :max_per_page, 1000 end |