diff --git a/app/helpers/rails_admin/form_builder.rb b/app/helpers/rails_admin/form_builder.rb index 794af1c612..ca680ee486 100644 --- a/app/helpers/rails_admin/form_builder.rb +++ b/app/helpers/rails_admin/form_builder.rb @@ -43,7 +43,7 @@ def fieldset_for fieldset, nested_in def field_wrapper_for field, nested_in if field.label # do not show nested field if the target is the origin - unless field.inverse_of.presence && field.inverse_of == nested_in + unless field.inverse_of.presence && field.inverse_of == nested_in && @template.instance_variable_get(:@model_config).label == field.label @template.content_tag(:div, :class => "control-group #{field.type_css_class} #{field.css_class} #{'error' if field.errors.present?}", :id => "#{dom_id(field)}_field") do label(field.method_name, field.label, :class => 'control-label') + (field.nested_form ? field_for(field) : input_for(field))