提交 6c36c369 编写于 作者: R Rafael Mendonça França

Revert "Move the handling of supported arguments to `where`"

This reverts commit 4d8f62dc.

Reason: This broke the build. Please recommit again when it is green.
上级 bae2292d
......@@ -552,6 +552,8 @@ def where(opts = :chain, *rest)
WhereChain.new(spawn)
elsif opts.blank?
self
elsif !opts.is_a?(String) && !opts.respond_to?(:to_h)
raise ArgumentError, "Unsupported argument type: #{opts} (#{opts.class})"
else
spawn.where!(opts, *rest)
end
......
......@@ -21,7 +21,7 @@ def build(opts, other)
parts = predicate_builder.build_from_hash(attributes)
else
raise ArgumentError, "Unsupported argument type: #{opts} (#{opts.class})"
parts = [opts]
end
WhereClause.new(parts, binds)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册