Top "Mongoid" questions

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

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 …

ruby-on-rails mongodb mongoid
Dynamic attributes with Rails and Mongoid

I'm learning MongoDB through the Mongoid Ruby gem with Rails (Rails 3 beta 3), and I'm trying to come up with a …

ruby-on-rails mongodb mongoid dynamic-attributes
Use LIKE/regex with variable in mongoid

I'm trying to find all documents whose text contains the word test. The below works fine: @tweets = Tweet.any_of({ :…

ruby-on-rails mongodb ruby-on-rails-3.1 mongoid
How can I disable MongoDB log messages in console?

I have this little test script: require 'mongo' mongo_client = Mongo::Client.new(['127.0.0.1:27017'], :database => 'test') mongo_client[:…

ruby mongodb mongoid
Clean out, or reset test-database with Rspec and MongoID on Rails 3

When I run my rspec tests, many fail due to stale data in my mongodb database. AFAIK it is far …

ruby-on-rails-3 rspec mongoid
Rails 3: undefined method `page' for #<Array:0xafd0660>

I can't get past this. I know I've read there isn't a page method for arrays but what do I …

ruby-on-rails-3 mongoid kaminari
Why is_a? returns false for Hash class?

Why is_a? returns false for a Hash class? Example: value = {"x" => 3, "y" => 2} puts value.class puts value.…

ruby database mongoid
How do you do wildcard searches with Mongoid in a Ruby on Rails environment?

The Mongoid documentation only gives one example of doing a wildcard search: Person.where(first_name: /^d/i) This finds …

ruby-on-rails regex mongodb mongoid
Query on Mongoid Hash Field

I want to query on a Hash field for a Mongoid Class. I'm not sure how I can do this …

ruby-on-rails ruby mongodb mongoid nosql
Mongoid not in query

I have some trouble with mongoid: test "Test candidate" do User.create(:id => 1, :sex => User::Male, :country => 1, :…

ruby-on-rails ruby mongodb mongoid nosql