lib/cm_admin/models/row.rb in cm-admin-1.5.27 vs lib/cm_admin/models/row.rb in cm-admin-1.5.28

- old
+ new

@@ -25,16 +25,24 @@ else @row_fields << CmAdmin::Models::FormField.new(field_name, options[:input_type], options) end end + def field(field_name, options={}) + if @current_nested_field + @current_nested_field.fields << CmAdmin::Models::Field.new(field_name, options) + else + @row_fields << CmAdmin::Models::Field.new(field_name, options) + end + end + def cm_section(section_name, col_size: nil, display_if: nil, &block) @sections << CmAdmin::Models::Section.new(section_name, @current_action, @model, display_if, col_size, &block) end # This method is deprecated. Use cm_section instead. def cm_show_section(section_name, col_size: nil, display_if: nil, &block) cm_section(section_name, col_size: col_size, display_if: display_if, &block) end end end -end \ No newline at end of file +end