in previous released of Mongoid (2.0.beta.20), I could pass a class type as the 2nd parameter of the .find_or_create_by block on embedded document collections.
i have some embedded documents. Company -> Stand -> Product. Document product have field \"tag\". I can do this request very well: Company.where(\"stands.products.tags\" => 开发者_如何学Python\"books\
I\'m trying to setup a versioning system on Mongoid.开发者_如何学编程I\'m running into the problem that the new embedded version objects are not being saved when the parent object is saved:
I am trying to select a collection of document based on the content of their embedded documents. My model looks l开发者_开发百科ike this:
class Cart include Mongoid::Document embeds_many :cart_items def calculate_prices # Set some fields end def remove_item(item)
with a has_one/belongs_to relationship, i cannot seem to update nested records via mass assignment. models:
I开发者_StackOverflow中文版 am using Rails 3 and Mongoid. I am able to store text fields and select fields but can\'t seen to figuer out how to store a radio option in the DB whe the form is submitte
Hi friends~ I wanna use MongoDB to implement a group based friendship model. Like Google Buzz. For example,
i am having an issue with updating existing documents composite key fields in rails.the associated mongo query for my u开发者_如何学Cpdate_attributes statement seems to be correct, however the object
When we start a brand new rails pro开发者_JAVA技巧ject we use db:seed to populate db data. During project lifetime in an ActiveRecord backed project we can use migrations to change schema and data.