diff options
author | Darwin D Wu <wuddarwin@gmail.com> | 2018-08-15 17:18:51 -0700 |
---|---|---|
committer | Darwin D Wu <wuddarwin@gmail.com> | 2018-09-11 00:13:09 -0700 |
commit | 5291044a1d7866d2942276d812a5d3a72a67ef27 (patch) | |
tree | 3bb6f91fdec76505a2ff1104adda74dd6773dd99 /activerecord/lib/active_record.rb | |
parent | 5b0b1ee8fda1cd086653992f812f96c62fb3c24b (diff) | |
download | rails-5291044a1d7866d2942276d812a5d3a72a67ef27.tar.gz rails-5291044a1d7866d2942276d812a5d3a72a67ef27.tar.bz2 rails-5291044a1d7866d2942276d812a5d3a72a67ef27.zip |
Fixes #33610
In order to avoid double assignments of nested_attributes for `has_many`
relations during record initialization, nested_attributes in `create_with`
should not be passed into `klass.new` and have them populate during
`initialize_internals_callback` with scope attributes.
However, `create_with` keys should always have precedence over where
clauses, so if there are same keys in both `create_with` and
`where_values_hash`, the value in `create_with` should be the one that's
used.
Diffstat (limited to 'activerecord/lib/active_record.rb')
0 files changed, 0 insertions, 0 deletions