Module: Walruz::More::Pagination
- Defined in:
- lib/walruz/more/pagination.rb,
lib/walruz/more/pagination/base.rb,
lib/walruz/more/pagination/will_paginate_collection.rb
Overview
This module can be included into association like objects
Defined Under Namespace
Modules: Base, WillPaginateCollection
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/walruz/more/pagination.rb', line 13 def self.included(base) if base.instance_methods.include?('paginate') # We are talking about an already paginated element, we use WillPaginate extension instead base.send(:include, Base) else raise RuntimeError.new("Walruz::More::Paginate needs WillPaginate in order to work") end end |