mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix test_has_many_association_through_a_has_many_association_with_nonstandard_primary_keys
This commit is contained in:
parent
cee3f9b36d
commit
bb063b2f1b
2 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ module ActiveRecord
|
||||||
foreign_key = reflection.foreign_key
|
foreign_key = reflection.foreign_key
|
||||||
else
|
else
|
||||||
key = reflection.foreign_key
|
key = reflection.foreign_key
|
||||||
foreign_key = reflection.association_primary_key
|
foreign_key = reflection.active_record_primary_key
|
||||||
end
|
end
|
||||||
|
|
||||||
if reflection == through_reflection_chain.last
|
if reflection == through_reflection_chain.last
|
||||||
|
|
|
@ -372,7 +372,7 @@ module ActiveRecord
|
||||||
# Holds all the meta-data about a :through association as it was specified
|
# Holds all the meta-data about a :through association as it was specified
|
||||||
# in the Active Record class.
|
# in the Active Record class.
|
||||||
class ThroughReflection < AssociationReflection #:nodoc:
|
class ThroughReflection < AssociationReflection #:nodoc:
|
||||||
delegate :foreign_key, :foreign_type, :association_foreign_key, :to => :source_reflection
|
delegate :foreign_key, :foreign_type, :association_foreign_key, :active_record_primary_key, :to => :source_reflection
|
||||||
|
|
||||||
# Gets the source of the through reflection. It checks both a singularized
|
# Gets the source of the through reflection. It checks both a singularized
|
||||||
# and pluralized form for <tt>:belongs_to</tt> or <tt>:has_many</tt>.
|
# and pluralized form for <tt>:belongs_to</tt> or <tt>:has_many</tt>.
|
||||||
|
|
Loading…
Reference in a new issue