Given the following models: class Company include Mongoid::Document has_many :workers, autosave: true accepts_nested_attributes_for :workers
Is it possible to get real polymorphism in Mongoid? Example: class Company include Mongoid::Document has_many :workers, as: :workable
I have download the template Rails 3 + Mongoid + Devise and installed. I have create a scaffold Car for relation with User model of Devise. I have in my User model this code:
Is there a formbuilder for Mongoid 2.0 ? Wh开发者_开发问答ich generates automatically a form from a model.
I having trouble persisting my documents in mongoid.I have the following code fragment in my controller:
I\'m trying to embed a new document in a previously existing document. When the object was created, the root document looked like this:
I have a situation where I\'m importing feeds from multiple sources, and have to deal with the fact that attributes are not consistant across feeds.So for an example of some attributes, my site would
开发者_StackOverflowHow can I make a query with or condition in Mongoid.Here is the solution for \"OR\" query in mongoid.
In my problem I need posts to each belong to Category but I also want every post to be in a second category. Such that one post could be in \"News\" and another in \"Sports\" but they would both be in
I\'m having some problems creating a tree menu using Rails 3.1 and Mongoid. I have a site model that embeds_many pages. Pages can have a parent page using a field called parent.