• E
    Don't unset foreign key when preloading missing record · 0cdeda58
    Eugene Kenny 提交于
    When a belongs to association's target is set, its foreign key is now
    updated to match the new target. This is the correct behaviour when a
    new record is assigned, but not when the existing record is preloaded.
    
    As long as we mark the association as loaded, we can skip setting the
    target when the record is missing and avoid clobbering the foreign key.
    0cdeda58
association.rb 4.0 KB