aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md20
1 files changed, 17 insertions, 3 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index f0ae0050a7..ed076c04bb 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,17 @@
+* Polymorphic belongs_to associations with the `touch: true` option set update the timestamps of
+ the old and new owner correctly when moved between owners of different types.
+
+ Example:
+
+ class Rating < ActiveRecord::Base
+ belongs_to :rateable, polymorphic: true, touch: true
+ end
+
+ rating = Rating.create rateable: Song.find(1)
+ rating.update_attributes rateable: Book.find(2) # => timestamps of Song(1) and Book(2) are updated
+
+ *Severin Schoepke*
+
* Improve formatting of migration exception messages: make them easier to read
with line breaks before/after, and improve the error for pending migrations.
@@ -772,11 +786,11 @@
*Neeraj Singh*
-* Removed deprecated method `scoped`
+* Removed deprecated method `scoped`.
*Neeraj Singh*
-* Removed deprecated method `default_scopes?`
+* Removed deprecated method `default_scopes?`.
*Neeraj Singh*
@@ -811,7 +825,7 @@
*Jon Leighton*
-* Remove `activerecord-deprecated_finders` as a dependency
+* Remove `activerecord-deprecated_finders` as a dependency.
*Łukasz Strzałkowski*