Hello all, I’ve recently been on a project where somewhere needs
using case insensitive search(using UPPER(name) LIKE ‘’) and LIKE condition,
I want to use arel and don’t use the old style string concatenation,
can arel handle this?
But I check on arel documentation, doesn’t seems have any upper/like operator,
and check on arel source, under lib/arel/nodes,
doesn’t seem to have any node related to this,
can arel handl this?
Thanks.
ps, the arel way of binding value seems to have its own invocation,
using eq(xxx),
accounts = Account.arel_table
Account.where(accounts[:id].eq(1).or(accounts[:id].eq(2)))
different from where rails old style binding,
like where(:conditions=>[UPPER(name) like ?, '%#{xxx}%]],
so How can I bind them two?