Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
through_recordthat has been destroyed in `create_through_re…
…cord` 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`.
- Loading branch information
Showing with 11 additions and 0 deletions.