diff options
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index f73fc9d9a3..7dbfad4473 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -447,6 +447,28 @@ *Aaron Stone + Rafael Mendonça França* * `Relation#merge` now only overwrites where values on the LHS of the +======= +* Belongs_to :touch behavior now touches old association when + transitioning to new association + + class Passenger < ActiveRecord::Base + belongs_to :car, touch: true + end + + car_1 = Car.create + car_2 = Car.create + + passenger = Passenger.create :car => car_1 + + passenger.car = car_2 + passenger.save + + Previously only car_2 would be touched. Now both car_1 and car_2 + will be touched. + + *Adam Gamble* + +* Relation#merge now only overwrites where values on the LHS of the merge. Consider: left = Person.where(age: [13, 14, 15]) |