diff options
author | wangjohn <wangjohn@mit.edu> | 2013-02-18 20:07:05 -0500 |
---|---|---|
committer | wangjohn <wangjohn@mit.edu> | 2013-02-25 00:29:28 -0500 |
commit | e52ff809606323f7370cfaf6e63b083f9b108d6c (patch) | |
tree | 21e150731afe39e38803ae2339febed32f4f1532 /activerecord/CHANGELOG.md | |
parent | 3762ee0baa2285bdc4a76d4d492fbe34a10cdc3a (diff) | |
download | rails-e52ff809606323f7370cfaf6e63b083f9b108d6c.tar.gz rails-e52ff809606323f7370cfaf6e63b083f9b108d6c.tar.bz2 rails-e52ff809606323f7370cfaf6e63b083f9b108d6c.zip |
Raising an ActiveRecordError when one tries to use .touch(name) on a new
object that has not yet been persisted. This behavior follows the
precedent set by update_columns.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index b3301f70dc..c7085a0eaa 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,16 @@ ## Rails 4.0.0 (unreleased) ## +* Fixing issue #8345. Now throwing an error when one attempts to touch a + new object that has not yet been persisted. For instance: + + ball = Ball.new + ball.touch :updated_at # => raises error + + It is not until the ball object has been persisted that it can be touched. + This follows the behavior of update_column. + + *John Wang* + * Preloading ordered `has_many :through` associations no longer applies invalid ordering to the `:through` association. Fixes #8663. |