mongoid
Efficient way to store data in MongoDB: embedded documents vs individual documents
I store user activity data: when user visited current article, topic or personal message to show him how many new comments and messages were added while he was offline.[详细]
2023-03-30 14:51 分类:问答Switching from SQl to MongoDB in Rails 3
I am considering switching a quite big application (Rails 3.0.10) from our SQL database (SQLite and Postgres) to MongoDB. I plan to put everything in it, mainly utf-8 string, binar开发者_如何学运维y f[详细]
2023-03-30 11:41 分类:问答Mongoid Query Syntax Question
I need to retrieve a set of answers according to 2 attributes. This is what i want to do: # wh开发者_如何转开发ere liker_ids is an array and user_id is a bson in the answer document[详细]
2023-03-29 22:13 分类:问答Mongoid accepts_nested_attributes_for issue
I have got this relations class Bird include Mongoid::Document has_many :eggs accepts_nested_attributes_for :eggs[详细]
2023-03-29 21:05 分类:问答Converting referenced documents into embedded
So I\'m using mongoid in my rails app and have been referencing all of my class relations by default.开发者_运维知识库 I\'ve realized some of these would be better off being embedded and was just wond[详细]
2023-03-29 16:32 分类:问答Month pagination with kaminari
I want to paginate posts by month so I added following scope in Post model class Post include Mongoid::Document[详细]
2023-03-29 06:04 分类:问答Mongoid equivalent of ActiveRecord's `serialize` method
hope the title\'s pretty self-explanatory. I\'m using mongoid as my ORM for a Rails app, and I was wondering if anybody knew if it has an equivalent to ActiveRecord\'s serialize meth开发者_运维技巧od[详细]
2023-03-28 21:45 分类:问答soft deleting mongoid document along with associated documents
I h开发者_StackOverflowave 2 models, user and posts class User include Mongoid::Document include Mongoid::Paranoia[详细]
2023-03-28 14:56 分类:问答Mongoid causing error whenever I use gem command
Earlier today I added the mongoid gem version \'2.0\' to an app. Ever since then, any time I use the gem command I get the following errors:[详细]
2023-03-28 07:04 分类:问答Finding mongoDB records in batches (using mongoid ruby adapter)
Using rails 3 and mongoDB with the mongoid adapter, how can I batch finds to the mongo DB?I need to grab all the records in a particular mongo DB collection and index them in solr (initial index of da[详细]
2023-03-28 05:22 分类:问答