Sha256: 233b514e0af536ba6da4792e46cdd2a88fa3463796f7ed160097e41a497765a2

Contents?: true

Size: 832 Bytes

Versions: 1

Compression:

Stored size: 832 Bytes

Contents

<div class="container space-y-8" data-controller="nested-form">
  <template data-target="nested-form.template">

    <%= form.fields_for field.attribute_name, field.to_model.new, child_index: 'NEW_RECORD' do |nested_form| %>
      <%= render(
        partial: field.to_partial_path('fields'),
        locals: {
          f: nested_form,
          field: field
        }
      ) %>
  <% end %>
  </template>

    <%= form.fields_for field.attribute_name do |nested_form| %>
      <%= render(
        partial: field.to_partial_path('fields'),
        locals: {
          f: nested_form,
          field: field
        }
      ) %>
  <% end %>

  <%= content_tag :div, class: '', data: { target:"nested-form.links" } do %>
    <%= link_to "+ Add new", "#",  data: { action: "click->nested-form#add_association" } %>
  <% end %>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
madmin-2.0.0 app/views/madmin/fields/nested_has_many/_form.html.erb