mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
type_condition
should be overwritten by create_with_value
in scope_for_create
`type_condition` should be overwritten by `create_with_value`. So `type` in `create_with_value` should be a string because `where_values_hash` keys are converted to string. Fixes #27600.
This commit is contained in:
parent
07307a7b9d
commit
57c44f0d09
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ module ActiveRecord
|
|||
relation = Relation.create(self, arel_table, predicate_builder)
|
||||
|
||||
if finder_needs_type_condition? && !ignore_default_scope?
|
||||
relation.where(type_condition).create_with(inheritance_column.to_sym => sti_name)
|
||||
relation.where(type_condition).create_with(inheritance_column.to_s => sti_name)
|
||||
else
|
||||
relation
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue