Module: Para::Component::FormDecorator
- Includes:
- BaseDecorator
- Defined in:
- app/decorators/para/component/form_decorator.rb
Instance Method Summary collapse
- #page_container_class ⇒ Object
- #path(namespace: :resource, **options) ⇒ Object
- #relation_path(controller_or_resource, *nested_resources, **options) ⇒ Object
Instance Method Details
#page_container_class ⇒ Object
23 24 25 |
# File 'app/decorators/para/component/form_decorator.rb', line 23 def page_container_class history? ? 'col-md-8' : super end |
#path(namespace: :resource, **options) ⇒ Object
6 7 8 |
# File 'app/decorators/para/component/form_decorator.rb', line 6 def path(namespace: :resource, **) find_path([:admin, self, namespace], ) end |
#relation_path(controller_or_resource, *nested_resources, **options) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/decorators/para/component/form_decorator.rb', line 10 def relation_path(controller_or_resource, *nested_resources, **) nested = nested_resources.any? if Hash === controller_or_resource = controller_or_resource end [:action] = action_option_for(, nested: nested) data = [:admin, self, :resource, *nested_resources] find_path(data, ) end |