squeel
squeel copied to clipboard
like_any [] fails in Rails 4.2.1 with Ruby 2.2.1
Contact.where{ email.like_any([]) }.to_sql
raises RuntimeError: unsupported: NilClass
I'd submit a pull if I knew where that code was, but I don't see any tests for like_any
. Can someone point me to the right places?
Have the same issue. Did you figure out how to solve it?
Same issue here.
I fixed like this for now:
if list.empty?
Contact
.where("1 = 0")
else
Contact
.where{ email.like_any(list) }
end
I find the same issue closed here: #200