我有这个模型:
class Kpi
include Mongoid::Timestamps
#include Mongoid::Document
field :number_of_users, :type => Integer, :default => 0
end
当我运行 rake 路线时,我收到了这个错误:
rake aborted!
undefined method `field' for Kpi:Class
知道为什么会这样吗?
谢谢!
我有这个模型:
class Kpi
include Mongoid::Timestamps
#include Mongoid::Document
field :number_of_users, :type => Integer, :default => 0
end
当我运行 rake 路线时,我收到了这个错误:
rake aborted!
undefined method `field' for Kpi:Class
知道为什么会这样吗?
谢谢!