• R
    Reload `through_record` that has been destroyed in `create_through_record` · e09da8bf
    Ryuta Kamizono 提交于
    This is an alternative of #27714.
    
    If `has_one :through` association has set `nil`, `through_record` is
    destroyed but still remain loaded target in `through_proxy` until
    `reload` or `reset` explicitly.
    
    If `through_proxy` is not reset (remain destroyed (frozen) target),
    setting new record causes `RuntimeError: Can't modify frozen hash`.
    
    To prevent `RuntimeError`, should reload `through_record` that has been
    destroyed in `create_through_record`.
    e09da8bf
has_one_through_association.rb 1.1 KB