- nested_locals ||= {} .panel.panel-default.form-fields{ class: ('nested-many-inset-panel' if inset), data: { persisted: form.object.persisted? } } .panel-heading = form.reorder_anchor %h3.panel-title = link_to "##{ form.nested_resource_dom_id }", class: "nested-input-title collapsed#{ (' has-error' if form.object.errors.any?) }", data: { toggle: 'collapse', :'open-on-insert' => true } do = form.nested_resource_name %i.fa.fa-angle-up = form.remove_association_button .panel-collapse.form-inputs.collapse{ id: form.nested_resource_dom_id, class: ('in' if uncollapsed && form.object.persisted?), data: { rendered: render_partial, render_path: @component.path(remote_partial_params), id: form.object.id, :"object-name" => form.object_name, :"model-name" => model.name } } .panel-body{ data: { :"nested-form-container" => true } } - if render_partial = render partial: find_partial_for(model, form.nested_fields_partial_name), locals: { form: form }.merge(nested_locals) - else = fa_icon "spinner spin" -# Add inheritance column field if needed = form.hidden_field form.object.class.inheritance_column if form.object.class.column_names.include?(form.object.class.inheritance_column) .clearfix