aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2013-07-14 03:02:47 +0900
committerkennyj <kennyj@gmail.com>2013-07-14 03:02:47 +0900
commit33354aa23e9d34bdf5aae8ab942cf830bf9f2782 (patch)
tree0182d63a31fcaaaa66243512da8d45d3dd14c82f /activerecord/CHANGELOG.md
parent4f8168ec58cbc0bf1f1e442af2e93ccc1dd8dba0 (diff)
downloadrails-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.md13
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`.