lib/cm_admin/models/row.rb in cm-admin-1.5.39 vs lib/cm_admin/models/row.rb in cm-admin-1.5.40

- old
+ new

@@ -41,8 +41,14 @@ # This method is deprecated. Use cm_section instead. def cm_show_section(section_name, col_size: nil, display_if: nil, html_attrs: nil, &block) cm_section(section_name, col_size: col_size, display_if: display_if, html_attrs: html_attrs, &block) end + + def nested_form_section(section_name, display_if: nil, col_size: nil, html_attrs: nil, &block) + nested_section = CmAdmin::Models::Section.new(section_name, @current_action, @cm_model, display_if, html_attrs, col_size, &block) + nested_section.parent_section = self + @row_fields << nested_section + end end end end