Sha256: 80a0ea35ff6361c713e21e06806b3596f65a3ad34294580c28b25b0b01639c28

Contents?: true

Size: 704 Bytes

Versions: 36

Compression:

Stored size: 704 Bytes

Contents

module Para
  module Component
    module FormDecorator
      include Para::Component::BaseDecorator

      def path(namespace: :resource, **options)
        find_path([:admin, self, namespace], options)
      end

      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

      def page_container_class
        history? ? 'col-md-8' : super
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
para-0.12.4 app/decorators/para/component/form_decorator.rb
para-0.12.3 app/decorators/para/component/form_decorator.rb
para-0.12.2 app/decorators/para/component/form_decorator.rb
para-0.12.1 app/decorators/para/component/form_decorator.rb
para-0.12.0 app/decorators/para/component/form_decorator.rb
para-0.11.4 app/decorators/para/component/form_decorator.rb
para-0.11.3 app/decorators/para/component/form_decorator.rb
para-0.11.2 app/decorators/para/component/form_decorator.rb
para-0.11.1 app/decorators/para/component/form_decorator.rb
para-0.11.0 app/decorators/para/component/form_decorator.rb
para-0.10.0 app/decorators/para/component/form_decorator.rb
para-0.9.4 app/decorators/para/component/form_decorator.rb
para-0.9.3.3 app/decorators/para/component/form_decorator.rb
para-0.9.3.2 app/decorators/para/component/form_decorator.rb
para-0.9.3.1 app/decorators/para/component/form_decorator.rb
para-0.9.2 app/decorators/para/component/form_decorator.rb
para-0.9.0 app/decorators/para/component/form_decorator.rb
para-0.8.15 app/decorators/para/component/form_decorator.rb
para-0.8.14 app/decorators/para/component/form_decorator.rb
para-0.8.13 app/decorators/para/component/form_decorator.rb