4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/bard/tag_field/field.rb', line 4
def render &block
@options = @options.dup.transform_keys(&:to_s)
add_default_name_and_id(@options)
choices = @options.delete("choices")
@choices = choices
result = @template_object.content_tag("input-tag", @options) do
content = block ? block.call(@options) : render_object_values
if choices&.any? && !block && !@options["list"]
content += render_datalist(nil, choices)
end
content
end
result
end
|