【发布时间】:2015-07-26 11:52:50
【问题描述】:
我正在传递一个变量
numbers = ["one", "two", ["three", "four"], "five"]
到我的模型中的查询:Modelname.where(number: numbers ) 但我只获得编号 attr 数值等于:“一”、“二”、“五”的检索对象。
如何获取“三”和“四”对象?
【问题讨论】:
-
方法如下:
numbers = ["one","two","three","four","five"].
标签: ruby-on-rails activerecord where