从数组为mongoid rails构建哈希查询

时间:2018-03-30 11:26:50

标签: ruby-on-rails ruby mongoid

对于postgresql我有这样的查询:

users = users.where(search_string.join(' or '), search: "%# 
{params[:search][:value]}%")

但我需要重建它以获取错误ArgumentError的mongoid cos(错误的参数数量(给定2,预期为1))

有人可以解释怎么做吗?

0 个答案:

没有答案