Class: Wallaby::AuthorizerFinder
- Inherits:
-
DecoratorFinder
- Object
- ClassFinder
- DecoratorFinder
- Wallaby::AuthorizerFinder
- Defined in:
- lib/services/wallaby/authorizer_finder.rb
Instance Attribute Summary
Attributes inherited from ClassFinder
#current_controller_class, #model_class, #script_name
Instance Method Summary collapse
-
#execute ⇒ Class
Find authorizer class by script name and model class from the following places:.
Instance Method Details
#execute ⇒ Class
Find authorizer class by script name and model class from the following places:
- #controller_class's #model_authorizer
- possible authorizer class built from script name and model class,
e.g. /admin and Order::Item will give us the possible authorizers:
- Admin::Order::ItemAuthorizer
- Order::ItemAuthorizer
- ItemAuthorizer
- #controller_class's default #application_authorizer
17 18 19 20 21 |
# File 'lib/services/wallaby/authorizer_finder.rb', line 17 def execute controller_class. || possible_default_class || controller_class. end |