diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-07-20 09:00:00 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-07-20 09:00:00 -0600 |
commit | c0ef95a1c6db3095c4b5f80f8044fbbbdfebeff1 (patch) | |
tree | aa9fc8ebdb6f6dd23cd34a702021825c42652ba4 /activerecord/CHANGELOG.md | |
parent | 9bd6e39b0cc65a3e534b55ab3239374239b19927 (diff) | |
download | rails-c0ef95a1c6db3095c4b5f80f8044fbbbdfebeff1.tar.gz rails-c0ef95a1c6db3095c4b5f80f8044fbbbdfebeff1.tar.bz2 rails-c0ef95a1c6db3095c4b5f80f8044fbbbdfebeff1.zip |
Correctly ignore `mark_for_destruction` without `autosave`
As per the docs, `mark_for_destruction` should do nothing if `autosave`
is not set to true. We normally persist associations on a record no
matter what if the record is a new record, but we were always skipping
records which were `marked_for_destruction?`.
Fixes #20882
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 3fa24f3837..aa2438fb3f 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,10 @@ +* Correctly ignore `mark_for_destruction` when `autosave` isn't set to `true` + when validating associations. + + Fixes #20882. + + *Sean Griffin* + * Fix a bug where counter_cache doesn't always work with polymorphic relations. |