I have products in the form of an embedded document inside the class below:
'Mongo_mapper' category in the category: Mongomar :: Document key: Name, string key: Number of products, integer many: end of products and here is the product category:
requires the MongoMapper :: EmbeddedDocument key in the 'Mongo_mapper' category product, name, string and The following code is used to display but it says that "name" requires 'rugbygums', 'mungo' is required 'demand_mapper' is required 'category' is required 'product' In which Mongo Mongomapramate = 'Northwind' category = category all () categories.each {| Category | Sets the square. Unless that category.Products.nil? Category.Products.each {| Products | Here is an error:
undefined method {"name" = 'gt;' 'Amiga'}: BSON :: hash ordered (noamthier entry)
OK, the first thing to try is that you have:
many: products ... but then you can call it So, Maybe: Certainly be consistent with your naming, and I do not have Ruby conventions (underscore, not secrete of camel, and of course, tissue cases for non-squares). In).
Comments
Post a Comment