2
3
4
5
6
7
8
9
10
11
12
|
# File 'app/inputs/repeater_input.rb', line 2
def input(wrapper_options = nil)
merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
content = ActiveSupport::SafeBuffer.new
content << '<div class="repeater__group-wrapper">'.html_safe
content << repeater_group_fields(options)
content << '</div>'.html_safe
content << content_tag(:div, "Add #{attribute_name.to_s.humanize.downcase}", class: 'repeater__add-item-button btn btn-default')
content << content_tag(:div, '', class: 'repeater__template', data: { template: repeater_group_fields(as_template: true) })
content
end
|