提交 a6984244 编写于 作者: S Sean Griffin

Fix build failures on PG

Honestly I don't think the tests that are fixed by this change should
have been merged. Passing a range or an array to `where` has a special
meaning. We need to solve the problem more concretely without overriding
the behavior that is present for *every* other type.

However, the damage has been done. These changes were in 5.1, so we need
a deprecation cycle to remove it.
上级 01425d8a
......@@ -85,6 +85,10 @@ def expand_from_hash(attributes)
expand_from_hash(query).reduce(&:and)
end
queries.reduce(&:or)
# FIXME: Deprecate this and provide a public API to force equality
elsif (value.is_a?(Range) || value.is_a?(Array)) &&
table.type(key.to_s).respond_to?(:subtype)
BasicObjectHandler.new(self).call(table.arel_attribute(key), value)
else
build(table.arel_attribute(key), value)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册