diff options
author | kennyj <kennyj@gmail.com> | 2013-07-14 03:02:47 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-07-14 03:02:47 +0900 |
commit | 33354aa23e9d34bdf5aae8ab942cf830bf9f2782 (patch) | |
tree | 0182d63a31fcaaaa66243512da8d45d3dd14c82f /activerecord/CHANGELOG.md | |
parent | 4f8168ec58cbc0bf1f1e442af2e93ccc1dd8dba0 (diff) | |
download | rails-33354aa23e9d34bdf5aae8ab942cf830bf9f2782.tar.gz rails-33354aa23e9d34bdf5aae8ab942cf830bf9f2782.tar.bz2 rails-33354aa23e9d34bdf5aae8ab942cf830bf9f2782.zip |
Reset @column_defaults when assigning .
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 1eb2f2d130..404443f4ad 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,16 @@ +* Reset @column_defaults when assigning `locking_column`. + We had a potential problem. For example: + + class Post < ActiveRecord::Base + self.column_defaults # if we call this unintentionally before setting locking_column ... + self.locking_column = 'my_locking_column' + end + + Post.column_defaults["my_locking_column"] + => nil # expected value is 0 ! + + *kennyj* + * Remove extra select and update queries on save/touch/destroy ActiveRecord model with belongs to reflection with option `touch: true`. |