开发者

If I can call SomeClass with some_class, then how can I call Module::SomeClass?

Post is accessible via

Blog.first.posts

How do I do this with a module name space? Such as 开发者_运维知识库Engine::Post

Blog.first.???

Thanks


Try explicitly giving Mongoid the class name

class Engine::Blog
  include Mongoid::Document

  embeds_many :posts, :class_name => "Engine::Post"
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜