标签: ruby ruby-on-rails-3 mongoid
可以通过
Blog.first.posts
如何使用模块名称空间执行此操作?比如Engine :: Post
Blog.first.???
由于
答案 0 :(得分:0)
尝试明确给予Mongoid类名
class Engine::Blog include Mongoid::Document embeds_many :posts, :class_name => "Engine::Post" end