<% unless field.nested_form[:update_only] || !field.inline_add %> <%= form.link_to_add " #{wording_for(:link, :new, field.associated_model_config.abstract_model)}".html_safe, field.name, { class: 'btn btn-info', :'data-add-label' => " #{wording_for(:link, :new, field.associated_model_config.abstract_model)}".gsub("\n", "") } %> <% end %>
<%= form.errors_for(field) %> <%= form.help_for(field) %>
<%= form.fields_for field.name do |nested_form| %> <% if field.nested_form[:allow_destroy] %> <%= nested_form.link_to_remove ''.html_safe %> <% end %> <%= nested_form.generate({action: :nested, model_config: field.associated_model_config, nested_in: field }) %> <% end %>