Mongoid 的 里面有 Regexp 的 类型
我定义如下
field :name_reg, :type => Regexp
运行却报错,请教一下,如何把 正则表达式存储到 mongodb 里面 ××××××××××××××× Routing Error
undefined method `instantiate' for Regexp:Class Try running rake routes for more information on available routes. ×××××××××××××××××
Below is a list of valid types for fields.
Array BigDecimal Boolean Date DateTime Float Hash Integer Moped::BSON::ObjectId Moped::BSON::Binary Range Regexp String Symbol Time TimeWithZone