Skip to content

Commit

Permalink
Possible fix for #1338
Browse files Browse the repository at this point in the history
field.associated_model_config returns an array, but abstract_model is in field
  • Loading branch information
pencilcheck committed Nov 15, 2014
1 parent cabe767 commit d548ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/rails_admin/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def without_field_error_proc_added_div

def nested_field_association?(field, nested_in)
field.inverse_of.presence && nested_in.presence && field.inverse_of == nested_in.name &&
(@template.instance_variable_get(:@model_config).abstract_model == field.associated_model_config.abstract_model ||
(@template.instance_variable_get(:@model_config).abstract_model == field.abstract_model ||
field.name == nested_in.inverse_of)
end
end
Expand Down

0 comments on commit d548ace

Please sign in to comment.