Module: SearchObject::Plugin::Paging
- Included in:
- Kaminari, WillPaginate
- Defined in:
- lib/search_object/plugin/paging.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/search_object/plugin/paging.rb', line 4 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#initialize(*args) ⇒ Object
8 9 10 11 |
# File 'lib/search_object/plugin/paging.rb', line 8 def initialize(*args) @page = args.pop.to_i.abs super *args end |
#page ⇒ Object
13 14 15 |
# File 'lib/search_object/plugin/paging.rb', line 13 def page @page end |
#per_page ⇒ Object
17 18 19 |
# File 'lib/search_object/plugin/paging.rb', line 17 def per_page self.class.get_per_page end |