Class: Wallaby::PaginatorFinder
- Inherits:
-
ServicerFinder
- Object
- ClassFinder
- ControllerFinder
- ServicerFinder
- Wallaby::PaginatorFinder
- Defined in:
- lib/services/wallaby/paginator_finder.rb
Instance Attribute Summary
Attributes inherited from ClassFinder
#current_controller_class, #model_class, #script_name
Instance Method Summary collapse
-
#execute ⇒ Class
Find paginator class by script name and model class from the following places:.
Instance Method Details
#execute ⇒ Class
Find paginator class by script name and model class from the following places:
-
possible paginator class built from script name and model class, e.g. /admin and Order::Item will give us the possible paginators:
-
Admin::Order::ItemPaginator
-
Order::ItemPaginator
-
ItemPaginator
-
18 19 20 21 22 |
# File 'lib/services/wallaby/paginator_finder.rb', line 18 def execute current_controller_class.model_paginator || possible_default_class || current_controller_class.application_paginator end |