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.
This commit is contained in:
parent
dd339bb0ad
commit
8b14b11434
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user