Open catmando opened 8 years ago
@catmando Can you provide a more complete example, so I can be sure I'm following the motivation for this?
From our code base. This is the actual example that trigged this issue
def render
div do
button(params.attributes.merge({id: "#{job.finishing.id}_trigger_button"})) do
# fixing this would allow us to write:
# button(params.attributes, id: "#{job.finishing.id}_trigger_button")
"Advanced Options"
end.on(:click) do
Element["#finishing_options_modal"].modal('show')
end
dialog_box
end if has_advanced_options?
end
once you allow the first parameter to be a hash to be merged with the rest, you might as well generalize and allow any combination of hashes, and strings.
This issue was moved to reactrb/reactrb#114
for example
should be the same as
Why? because sometimes you have a ready made set of params (i.e. attributes passed to a component) and you want to merge in others.
this is how you process the attributes (i just wanted to make sure it would work)