aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-05-19 20:39:52 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-05-25 23:55:38 +0900
commit8a600183550298a1f350a8fa8d72630da607fb60 (patch)
tree31d1b57cd110c16255a9faeeae89569634b61018 /activemodel/lib/active_model
parentcd4a88123dc17462d5c2ff29172b0366bca14e0e (diff)
downloadrails-8a600183550298a1f350a8fa8d72630da607fb60.tar.gz
rails-8a600183550298a1f350a8fa8d72630da607fb60.tar.bz2
rails-8a600183550298a1f350a8fa8d72630da607fb60.zip
Make force equality checking more strictly not to allow serialized attribute
Since #26074, introduced force equality checking to build a predicate consistently for both `find` and `create` (fixes #27313). But the assumption that only array/range attribute have subtype was wrong. We need to make force equality checking more strictly not to allow serialized attribute. Fixes #32761.
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/type/value.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/type/value.rb b/activemodel/lib/active_model/type/value.rb
index a8ea6a2c22..b6914dd63c 100644
--- a/activemodel/lib/active_model/type/value.rb
+++ b/activemodel/lib/active_model/type/value.rb
@@ -90,6 +90,10 @@ module ActiveModel
false
end
+ def force_equality?(_value) # :nodoc:
+ false
+ end
+
def map(value) # :nodoc:
yield value
end