#1 楼 @alucardpj 那还有比 activeResource 更好的 gem 包来实现两个系统之前的交互没了?
#4 楼 @dc2000 .......
#1 楼 @dc2000 faker 中文支持不太好,自定义的放在 config/locales 下面也不管用,
#1 楼 @dc2000 If your locale doesn't already exist, create it in the \lib\locales\ directory and you can then override or add elements to suit 文档上说要放在\lib\locales 下面, 我一会放在 config/locales 下面试试
#7 楼 @rei 嗯
#5 楼 @rei 哦,那 mongoid 的应该怎么写?
#3 楼 @chenge 下面是 model 代码:
class Statistic include Mongoid::Document field :qrcode, type: String field :purchasePrice, type: Float field :retailPrice, type: Float field :quantity, type: Integer field :retailDate, type: String end
#1 楼 @chenge
@statistics = Statistic.where(:retailDate => "#{params[:retailDate]}")
这种写法可以呀, 这个应该是不区分数据库的呀,