10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/helpers/shoelace/components/sl_select.rb', line 10
def select_content_tag(option_tags, _options, html_options)
html_options = html_options.stringify_keys
html_options['value'] ||= value
html_options["invalid"] = html_options["data-invalid"] = "" if object_has_errors?
add_default_name_and_id(html_options)
@template_object.content_tag("sl-select", html_options) do
"".html_safe.tap do |html|
html.safe_concat(option_tags)
html.safe_concat(@template_object.capture(&slot) || EMPTY) if slot
end
end
end
|