.panel.panel-default.form-fields .panel-heading %h3.panel-title = link_to "##{ nested_form.nested_resource_dom_id }", class: "nested-input-title collapsed#{ (' has-error' if nested_form.object.errors.any?) }", data: { toggle: 'collapse', :'open-on-insert' => true } do = nested_form.nested_resource_name %i.fa.fa-angle-up .panel-body.panel-collapse.form-inputs.collapse{ id: nested_form.nested_resource_dom_id } = render partial: find_partial_for(model, form.nested_fields_partial_name), locals: { form: nested_form, parent: nested_form.object }.merge(nested_locals)