aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-07-13 07:14:59 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-07-16 15:38:49 +0900
commit01c85097d4977b0c141b7c89df15c0750f37c62d (patch)
tree301350f925e10f533c75923585a0f84d99828897 /activerecord/lib/active_record/relation/query_methods.rb
parent189b8a06dc703f7a8477f877f0a02e23dd691ed8 (diff)
downloadrails-01c85097d4977b0c141b7c89df15c0750f37c62d.tar.gz
rails-01c85097d4977b0c141b7c89df15c0750f37c62d.tar.bz2
rails-01c85097d4977b0c141b7c89df15c0750f37c62d.zip
Fix `create_with` using both string and symbol
This is related with #27680. Since `where_values_hash` keys constructed by `where` are string, so we need `stringify_keys` to `create_with_value` before merging it.
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 79495ead91..9d6db3dc64 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -797,7 +797,7 @@ module ActiveRecord
value = sanitize_forbidden_attributes(value)
self.create_with_value = create_with_value.merge(value)
else
- self.create_with_value = {}
+ self.create_with_value = FROZEN_EMPTY_HASH
end
self