<%= f.fields_for field.association_name do |nested_form| %>
<%= render(
partial: "fields/nested_has_many/fields",
locals: {
f: nested_form,
field: field,
},
) %>
<% end %>
<% if field.attribute.to_s == "line_items"%>
<%= link_to_add_association(
('ajouter' '').html_safe,
f,
field.association_name,
class: "button btn-rework button_add_associated_#{field.associated_class_name}",
# class: "button button_add_associated_#{field.associated_class_name}",
# # id usefull for the JS inside New quotation
# id: "button_add_associated_#{field.associated_class_name}",
partial: "fields/nested_has_many/fields",
render_options: { locals: { field: field } },
) %>
<% end %>
<% if field.attribute.to_s == "working_zones"%>
<%= link_to_add_association(
('ajouter''').html_safe,
f,
field.association_name,
class: "btn-rework button button_add_associated_#{field.associated_class_name}",
# class: "button button_add_associated_#{field.associated_class_name}",
# # id usefull for the JS inside New quotation
# id: "button_add_associated_#{field.associated_class_name}",
partial: "fields/nested_has_many/fields",
render_options: { locals: { field: field } },
) %>
<% end %>