• D
    Fixes #33610 · 5291044a
    Darwin D Wu 提交于
    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.
    5291044a
relations_test.rb 64.3 KB