mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
just wrap as a sql literal
This commit is contained in:
@@ -26,8 +26,7 @@ module ActiveRecord
|
||||
when Range, Arel::Relation
|
||||
attribute.in(value)
|
||||
when ActiveRecord::Base
|
||||
sanitized_id = attribute.class == Arel::Attributes::String ? value.id : value.quoted_id
|
||||
attribute.eq(sanitized_id)
|
||||
attribute.eq(Arel.sql(value.quoted_id))
|
||||
when Class
|
||||
# FIXME: I think we need to deprecate this behavior
|
||||
attribute.eq(value.name)
|
||||
|
||||
Reference in New Issue
Block a user