Module: Para::Component::FormDecorator

Includes:
BaseDecorator
Defined in:
app/decorators/para/component/form_decorator.rb

Instance Method Summary collapse

Instance Method Details

#page_container_classObject



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, **options)
  find_path([:admin, self, namespace], options)
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, **options)
  nested = nested_resources.any?

  if Hash === controller_or_resource
    options = controller_or_resource
  end

  options[:action] = action_option_for(options, nested: nested)
  data = [:admin, self, :resource, *nested_resources]

  find_path(data, options)
end