1
在这里有点麻烦。rails_admin - 嵌入的命名空间模型不显示
在下面的例子中,报价::的PropertyInfo不会在rails_admin仪表盘显示:
class Offer
include GlobalID::Identification
include Mongoid::Document
include Mongoid::Timestamps
field :price, type: Integer
field :funding_source, type: String
field :name, type: String
field :email, type: String
field :phone, type: String
field :phone_verified, type: Mongoid::Boolean, default: false
embeds_one :property_info, class_name: "Offer::PropertyInfo"
belongs_to :property
end
class Offer::PropertyInfo
include Mongoid::Document
field :street_name, type: String
field :street_number, type: String
field :unit_number, type: String
field :city, type: String
field :state, type: String
field :zip, type: String
embedded_in :offer
end
任何想法,为什么不呢?是否因为这些文件在同一个文件中?命名空间?使用mongoid 4.0.1。
谢谢!
您有任何解决方法吗? – pramod 2017-08-10 16:52:33