Module: Para::Component::BaseDecorator
- Includes:
- ActionDispatch::Routing::PolymorphicRoutes
- Included in:
- CrudDecorator, FormDecorator, SettingsDecorator
- Defined in:
- app/decorators/para/component/base_decorator.rb
Instance Method Summary collapse
- #path(namespace: nil, **options) ⇒ Object
- #relation_path(controller_or_resource, options = {}) ⇒ Object
Instance Method Details
#path(namespace: nil, **options) ⇒ Object
7 8 9 |
# File 'app/decorators/para/component/base_decorator.rb', line 7 def path(namespace: nil, **) find_path([:admin, self, namespace].compact, ) end |
#relation_path(controller_or_resource, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/decorators/para/component/base_decorator.rb', line 11 def relation_path(controller_or_resource, = {}) if Hash === controller_or_resource = controller_or_resource controller_or_resource = nil end components = [:admin, self, controller_or_resource].compact find_path(components, ) end |