Class: Wallaby::ServicerFinder
- Inherits:
-
ControllerFinder
- Object
- ClassFinder
- ControllerFinder
- Wallaby::ServicerFinder
- Defined in:
- lib/services/wallaby/servicer_finder.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ClassFinder
#current_controller_class, #model_class, #script_name
Instance Method Summary collapse
-
#execute ⇒ Class
Find servicer class by script name and model class from the following places:.
Instance Method Details
#execute ⇒ Class
Find servicer class by script name and model class from the following places:
- #current_controller_class's #model_servicer
- possible servicer class built from script name and model class,
e.g. /admin and Order::Item will give us the possible servicers:
- Admin::Order::ItemServicer
- Order::ItemServicer
- ItemServicer
- #current_controller_class's default #application_servicer
18 19 20 21 22 |
# File 'lib/services/wallaby/servicer_finder.rb', line 18 def execute current_controller_class.model_servicer || possible_default_class || current_controller_class.application_servicer end |