mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
just wrap as a sql literal
This commit is contained in:
parent
d33dcba72d
commit
8e8fb8a429
1 changed files with 1 additions and 2 deletions
|
@ -26,8 +26,7 @@ module ActiveRecord
|
||||||
when Range, Arel::Relation
|
when Range, Arel::Relation
|
||||||
attribute.in(value)
|
attribute.in(value)
|
||||||
when ActiveRecord::Base
|
when ActiveRecord::Base
|
||||||
sanitized_id = attribute.class == Arel::Attributes::String ? value.id : value.quoted_id
|
attribute.eq(Arel.sql(value.quoted_id))
|
||||||
attribute.eq(sanitized_id)
|
|
||||||
when Class
|
when Class
|
||||||
# FIXME: I think we need to deprecate this behavior
|
# FIXME: I think we need to deprecate this behavior
|
||||||
attribute.eq(value.name)
|
attribute.eq(value.name)
|
||||||
|
|
Loading…
Reference in a new issue