Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

stop nested associations from being ignored

  • Loading branch information...
commit 5eb90526c95ccf84b0fe8e19c09bc54dac91c05f 1 parent 2f04eb7
Paul Meserve authored July 18, 2012
2  app/helpers/rails_admin/form_builder.rb
@@ -43,7 +43,7 @@ def fieldset_for fieldset, nested_in
43 43
     def field_wrapper_for field, nested_in
44 44
       if field.label
45 45
         # do not show nested field if the target is the origin
46  
-        unless field.inverse_of.presence && field.inverse_of == nested_in
  46
+        unless field.inverse_of.presence && field.inverse_of == nested_in && @template.instance_variable_get(:@model_config).label == field.label
47 47
           @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
48 48
             label(field.method_name, field.label, :class => 'control-label') +
49 49
             (field.nested_form ? field_for(field) : input_for(field))

0 notes on commit 5eb9052

Please sign in to comment.
Something went wrong with that request. Please try again.