lib/coprl/presenters/dsl/components/actions/base.rb in coprl-3.0.0.beta.4 vs lib/coprl/presenters/dsl/components/actions/base.rb in coprl-3.0.0.beta.5
- old
+ new
@@ -23,13 +23,17 @@
end
private
def extract_options!
- %i(path presenter target input_tag headers).each do |option|
+ %i(path presenter target headers).each do |option|
option_value = attribs.delete(option){:not_found}
@options.merge!({option => option_value}) unless option_value==:not_found
end
+ # Special case ... the input tag is defined at the component base level for all components
+ # By the time we get here we have put it into its accessor via the super call
+ # So we manually move it to the options for all actions
+ @options.merge!(input_tag: self.input_tag) if self.input_tag
end
def extract_dynamic_params(hash)
HashExt::Traverse.traverse(hash) do |k, v|
if v.respond_to?(:to_hash) || v.respond_to?(:dynamic_parameter)