We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 59eb4f4 + 6758b86 commit d0ce794Copy full SHA for d0ce794
activerecord/lib/active_record/reflection.rb
@@ -760,7 +760,7 @@ def automatic_inverse_of
760
plural_inverse_name = ActiveSupport::Inflector.pluralize(inverse_name)
761
reflection = klass._reflect_on_association(plural_inverse_name)
762
763
- if reflection && !active_record.automatically_invert_plural_associations
+ if valid_inverse_reflection?(reflection) && !active_record.automatically_invert_plural_associations
764
ActiveRecord.deprecator.warn(
765
"The `#{active_record.name}##{name}` inverse association could have been automatically" \
766
" inferred as `#{klass.name}##{plural_inverse_name}` but wasn't because `automatically_invert_plural_associations`" \
0 commit comments