Sha256: 24ee5c714d843b3944dbf31d9f360e6ea2e2d4f3c1c72931d6ab30fa729d6603
Contents?: true
Size: 849 Bytes
Versions: 1
Compression:
Stored size: 849 Bytes
Contents
<div data-controller="array-field"> <div data-array-field-target="templateFieldGroup"> <%= form.public_send(field_method, name, { multiple: true, value: "", **field_opts }) %> <% unless field_opts[:disabled] %> <%= button_tag "Remove", type: "button", data: { action: "click->array-field#removeField" } %> <% end %> </div> <% Array(value).each do |value_element| %> <div> <%= form.public_send(field_method, name, { multiple: true, value: value_element || "", **field_opts }) %> <% unless field_opts[:disabled] %> <%= button_tag "Remove", type: "button", data: { action: "click->array-field#removeField" } %> <% end %> </div> <% end %> <% unless field_opts[:disabled] %> <%= button_tag "Add more", type: "button", data: { action: "click->array-field#addField" } %> <% end %> </div>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_fields-1.1.0 | lib/generators/active_fields/scaffold/templates/views/shared/_array_field.html.erb |