aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-08-19 14:57:05 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-08-24 00:44:02 +0900
commit47a6d788ddbab08b2a04c72cd80352aac44090ab (patch)
treea3dbe86af22b7357be32a33a670e408ef1dcad57 /activemodel/CHANGELOG.md
parenta0b57bbb21ce81071220bd8c6cfd8cdda342c6c6 (diff)
downloadrails-47a6d788ddbab08b2a04c72cd80352aac44090ab.tar.gz
rails-47a6d788ddbab08b2a04c72cd80352aac44090ab.tar.bz2
rails-47a6d788ddbab08b2a04c72cd80352aac44090ab.zip
Fix numericality validator to still use value before type cast except Active Record
The purpose of fe9547b is to work type casting to value from database. But that was caused not to use the value before type cast even except Active Record. There we never guarantees that the value before type cast was going to the used in this validation, but we should not change the behavior unless there is some particular reason. To restore original behavior, still use the value before type cast if `came_from_user?` is undefined (i.e. except Active Record). Fixes #33651. Fixes #33686.
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r--activemodel/CHANGELOG.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md
index 4bf96e11b0..0b2fa37787 100644
--- a/activemodel/CHANGELOG.md
+++ b/activemodel/CHANGELOG.md
@@ -1,3 +1,9 @@
+* Fix numericality validator to still use value before type cast except Active Record.
+
+ Fixes #33651, #33686.
+
+ *Ryuta Kamizono*
+
* Fix `ActiveModel::Serializers::JSON#as_json` method for timestamps.
Before: