提交 8b14b114 编写于 作者: W Washington Luiz

Display value when raising due to unscope() issues

Hopefully make it easier to debug errors. e.g

Before:

    RuntimeError:
       unscope(where: "deleted_at") failed: unscoping String is unimplemented.

After:

    RuntimeError:
       unscope(where: "deleted_at") failed: unscoping String "'t'='t'" is unimplemented.
上级 dd339bb0
......@@ -877,7 +877,7 @@ def where_unscoping(target_value)
subrelation = (rel.left.kind_of?(Arel::Attributes::Attribute) ? rel.left : rel.right)
subrelation.name == target_value
else
raise "unscope(where: #{target_value.inspect}) failed: unscoping #{rel.class} is unimplemented."
raise "unscope(where: #{target_value.inspect}) failed: unscoping #{rel.class} \"#{rel}\" is unimplemented."
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册