Sha256: af3d3fc54bf03003415b73213b33ca44841262baf43388dcb4d4604a95285238

Contents?: true

Size: 800 Bytes

Versions: 7

Compression:

Stored size: 800 Bytes

Contents

- table_name = @ar_object._reflections[assoc_name.to_s].klass.table_name.to_sym
.nested-field-wrapper data-table-name=assoc_name data-model-name=assoc_name.to_s.classify
  label.nested-field-label = assoc_name.to_s.titleize
  .accordion.nested-form-accordion
    = f.fields_for table_name do |record|
      - if record.object.persisted?
        = render partial: '/cm_admin/main/nested_fields', locals: { f: record, assoc_name: assoc_name, section: section }
    - if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
      .links
        = link_to_add_association "+ Add #{assoc_name.to_s.titleize}", f, table_name, partial: '/cm_admin/main/nested_fields', render_options:  {locals: { assoc_name: assoc_name, section: section }}, class: 'd-inline-block secondary-btn mt-2'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cm-admin-1.1.8 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.1.7 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.1.6 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.1.5 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.1.4 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.1.3 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.1.2 app/views/cm_admin/main/_nested_table_form.html.slim