Sha256: ab306d74c43bb4c23cb9b0a1e6399dd9e59c7cc6d8d9efd02da415df92579131

Contents?: true

Size: 745 Bytes

Versions: 1

Compression:

Stored size: 745 Bytes

Contents

<%= content_tag :div, class: "nested-fields border border-gray-200 rounded-lg p-5", data: { new_record: f.object.new_record? } do %>
  <% field.nested_attributes.each do |name, nested_attribute| %>
    <% nested_field = nested_attribute.field %>
    <% next if nested_field.nil? %>
    <% next unless nested_field.visible?(action_name) %>
    <% next unless nested_field.visible?(:form) %>

    <div class="mb-4 flex">
      <%= render partial: nested_field.to_partial_path("form"), locals: { field: nested_field, record: f.object, form: f, resource: field.resource } %>
    </div>
  <% end %>

  <small><%= link_to "Remove", "#", data: { action: "click->nested-form#remove_association" } %></small>

  <%= f.hidden_field :_destroy %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

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