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