belongs_to infers the foreign key from the association name instead of from the class name. Fulfills the 1.2.4 deprecation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7812 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
9929cb4ec2
commit
cdc3c246c6
@ -1,5 +1,7 @@
|
|||||||
*SVN*
|
*SVN*
|
||||||
|
|
||||||
|
* belongs_to infers the foreign key from the association name instead of from the class name. [Jeremy Kemper]
|
||||||
|
|
||||||
* PostgreSQL: support multiline default values. #7533 [Carl Lerche, aguynamedryan, Rein Henrichs, Tarmo Tänav]
|
* PostgreSQL: support multiline default values. #7533 [Carl Lerche, aguynamedryan, Rein Henrichs, Tarmo Tänav]
|
||||||
|
|
||||||
* MySQL: fix change_column on not-null columns that don't accept dfeault values of ''. #6663 [Jonathan Viney, Tarmo Tänav]
|
* MySQL: fix change_column on not-null columns that don't accept dfeault values of ''. #6663 [Jonathan Viney, Tarmo Tänav]
|
||||||
|
@ -1617,7 +1617,7 @@ def association_join
|
|||||||
klass.quote_value(reflection.options[:source_type])
|
klass.quote_value(reflection.options[:source_type])
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
second_key = source_reflection.options[:foreign_key] || klass.to_s.foreign_key
|
second_key = source_reflection.primary_key_name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user