Please sign in to comment.
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.
- Loading branch information...
Showing with 25 additions and 12 deletions.