aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-02-18 16:04:47 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-02-18 16:04:47 +0900
commit4ea067017ae52d4a74335ed85df085a86663d213 (patch)
tree413f68bdb6283f455b788400a5e45d6ea86024d9 /activemodel/CHANGELOG.md
parent1dfd01475d93b8801df0a2933094b437a607e3e2 (diff)
parenteb73dfc0677cb5b3a0f559020fe5d7df556056b4 (diff)
downloadrails-4ea067017ae52d4a74335ed85df085a86663d213.tar.gz
rails-4ea067017ae52d4a74335ed85df085a86663d213.tar.bz2
rails-4ea067017ae52d4a74335ed85df085a86663d213.zip
Merge pull request #29651 from Sayanc93/return-correct-date
Return correct date in ActiveModel for time to date conversions
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r--activemodel/CHANGELOG.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md
index 912b307683..55e0c85b00 100644
--- a/activemodel/CHANGELOG.md
+++ b/activemodel/CHANGELOG.md
@@ -1,4 +1,21 @@
-* Fix year value when casting a multiparameter time hash
+* Fix date value when casting a multiparameter date hash to not convert
+ from Gregorian date to Julian date.
+
+ Before:
+
+ Day.new({"day(1i)"=>"1", "day(2i)"=>"1", "day(3i)"=>"1"})
+ => #<Day id: nil, day: "0001-01-03", created_at: nil, updated_at: nil>
+
+ After:
+
+ Day.new({"day(1i)"=>"1", "day(2i)"=>"1", "day(3i)"=>"1"})
+ => #<Day id: nil, day: "0001-01-01", created_at: nil, updated_at: nil>
+
+ Fixes #28521.
+
+ *Sayan Chakraborty*
+
+* Fix year value when casting a multiparameter time hash.
When assigning a hash to a time attribute that's missing a year component
(e.g. a `time_select` with `:ignore_date` set to `true`) then the year