当我创建类的实例时,会引发错误 NameError: undefined method 'options' for class 'Product'。
数据库:MongoDB 3.6
Class Product
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Attributes::Dynamic
field :options, type: Hash, default: {}
end
宝石:mongoid(6.1.1)
注意:当我将字段名称更改为option
或其他任何内容时效果很好,只有选项失败。TIA