Sha256: bff2b72eb4b68dfa2aaa9fbead8c41bba043ef005707d127b1d1e1ea80519ef0

Contents?: true

Size: 800 Bytes

Versions: 1

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 btn-secondary mt-2'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cm-admin-1.1.9 app/views/cm_admin/main/_nested_table_form.html.slim