Class: Voom::Presenters::DSL::Components::Actions::Replaces
- Includes:
- Namespace
- Defined in:
- lib/voom/presenters/dsl/components/actions/replaces.rb
Instance Attribute Summary
Attributes inherited from Base
#dynamic_params, #options, #params
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
-
#initialize(**attribs_, &block) ⇒ Replaces
constructor
A new instance of Replaces.
- #url ⇒ Object
Methods included from Namespace
Methods inherited from Base
Methods included from Pluggable
#include_plugins, #plugin, #plugin_module
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ Replaces
Returns a new instance of Replaces.
9 10 11 12 13 14 |
# File 'lib/voom/presenters/dsl/components/actions/replaces.rb', line 9 def initialize(**attribs_, &block) super(type: :replaces, **attribs_, &block) option_value = attribs.delete(:ignore_input_values) { :not_found } @options.merge!(ignore_input_values: option_value) unless option_value == :not_found @host = @params.fetch(:host, false) end |
Instance Method Details
#url ⇒ Object
16 17 18 19 |
# File 'lib/voom/presenters/dsl/components/actions/replaces.rb', line 16 def url presenter = ([:presenter], namespace) @parent.router.url(render: presenter, command: [:path], context: params, host: @host) end |