Sha256: f0c8783bd08fe0f53d8c3411b575d17f15226d95ac056357ff825b6cc8006247

Contents?: true

Size: 720 Bytes

Versions: 8

Compression:

Stored size: 720 Bytes

Contents

.nested-field-wrapper data-table-name=table_name data-model-name=table_name.to_s.classify
  label.nested-field-label = table_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: table_name, section: section }
    - if @reflections.select {|x| x if x.name == table_name}.first.macro == :has_many
      .links
        = link_to_add_association "+ Add #{table_name.to_s.titleize}", f, table_name, partial: '/cm_admin/main/nested_fields', render_options:  {locals: { assoc_name: table_name, section: section }}, class: 'd-inline-block secondary-btn mt-2'

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cm-admin-1.1.1 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.1.0 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.0.9 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.0.8 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.0.7 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.0.6 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.0.5 app/views/cm_admin/main/_nested_table_form.html.slim
cm-admin-1.0.3 app/views/cm_admin/main/_nested_table_form.html.slim