diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-01-03 13:38:40 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-03 16:24:32 -0800 |
commit | a9bed985cfd7d1ae93f475542bb878aa939e1c1e (patch) | |
tree | ddd967ba3ddb08f07dffe3860a489fffa974f5d4 /activemodel | |
parent | 99a8d8430f9b819cd3e8cb3aab44cb04ea402532 (diff) | |
download | rails-a9bed985cfd7d1ae93f475542bb878aa939e1c1e.tar.gz rails-a9bed985cfd7d1ae93f475542bb878aa939e1c1e.tar.bz2 rails-a9bed985cfd7d1ae93f475542bb878aa939e1c1e.zip |
When preloading a belongs_to, the target should still be set (to nil) if there is no foreign key present. And the loaded flag should be set on the association proxy. This then allows us to remove the foreign_key_present? check from BelongsToAssociation#find_target. Also added a test for the same thing on polymorphic associations.
Diffstat (limited to 'activemodel')
0 files changed, 0 insertions, 0 deletions