mongoid
Filling out an inherited mongoid document using nested attributes
Given the following models: class Company include Mongoid::Document has_many :workers, autosave: true accepts_nested_attributes_for :workers[详细]
2023-04-10 08:16 分类:问答Polymorphism in Mongoid
Is it possible to get real polymorphism in Mongoid? Example: class Company include Mongoid::Document has_many :workers, as: :workable[详细]
2023-04-10 07:03 分类:问答Mongoid + devise error Mongoid::Errors::InvalidCollection
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:[详细]
2023-04-10 06:01 分类:问答Automatic Formbuilder for Mongoid 2.0 ? Rails
Is there a formbuilder for Mongoid 2.0 ? Wh开发者_开发问答ich generates automatically a form from a model.[详细]
2023-04-10 05:53 分类:问答Mongoid document persistence after find
I having trouble persisting my documents in mongoid.I have the following code fragment in my controller:[详细]
2023-04-10 05:27 分类:问答Writing new embedded document in Mongoid fails mysteriously
I\'m trying to embed a new document in a previously existing document. When the object was created, the root document looked like this:[详细]
2023-04-10 02:55 分类:问答Is it possible to dynamically assign another accessor to an instance variable and have it persist across new instances?
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[详细]
2023-04-10 02:07 分类:问答How to make a query with or condition in mongoid
开发者_StackOverflowHow can I make a query with or condition in Mongoid.Here is the solution for \"OR\" query in mongoid.[详细]
2023-04-10 00:13 分类:问答Mongoid Associations not working
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[详细]
2023-04-09 20:44 分类:问答Tree menu using Mongoid
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.[详细]
2023-04-09 16:27 分类:问答