Top "Mongoid" questions

Mongoid is the official Ruby Object-Document-Mapper (ODM) for MongoDB.

Difference between "id" and "_id" fields in MongoDB

Is there any difference between using the field ID or _ID from a MongoDB document? I am asking this, because …

mongodb mongoid
MongoDB: count the number of items in an array

I have a collection where every document in the collection has an array named foo that contains a set of …

mongodb mongoid
How to deal with the timezone issue when storing dates in utc using mongod?

I have a mongodb collection where each document has some attributes and a utc timestamp. I need to pull out …

mongodb timezone mongoid aggregation-framework
Select where not null or empty in mongoid

I modified a model so it includes a new field, such as... field :url, :type => String I use activeadmin, …

ruby-on-rails mongoid
What is the length maximum for a string data type in MongoDB used with Ruby?

I wasn't able to find any information on the max length for a string data type in MongoDB on the …

ruby mongodb mongoid
Mongoid Rails 4 sort by asc or desc order created_at

I have a rails 4 app using Mongoid. I want to do something basic is display the book model I have …

sorting date ruby-on-rails-4 mongoid
ERROR Original Error: ImageMagick/GraphicsMagick is not installed

I have an app that is using Imagemagick, but I had to rebuild my environment and now when I try …

ruby-on-rails mongoid minimagick
How to implement has_many :through relationships with Mongoid and mongodb?

Using this modified example from the Rails guides, how does one model a relational "has_many :through" association using mongoid? …

ruby-on-rails activerecord mongodb data-modeling mongoid
Querying last 30 days date range with Mongoid and Ruby?

How do I go about querying a date range (of say the last 30 days from now) with Mongoid and Ruby? …

ruby mongodb mongoid date range
Creating short, unique object id's in MongoDB

I'm making an app similar to instagram using Rails/Mongoid. I want a unique ID that I can use in …

mongodb mongoid