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
精彩评论