mongoid
Why am I getting the error "db_name must be a string or symbol"?
Quick version (for those familiar with Mongoid & Sinatra): If it\'s not the Psyche/Syck YAML-parsing issue, why else might I get this error when trying to connect to a MongoDB database using Mongo[详细]
2023-03-28 02:55 分类:问答Mongoid embeds_many with default order
How can I set default order to my embeded objects, like: 开发者_如何学C class Post embeds_many :comments, :order => \"author\"[详细]
2023-03-27 19:57 分类:问答Mongoid and ActiveRecord relations: undefined method `quoted_table_name'
class Contest < ActiveRecord::Base has_one :claim_template end class ClaimTemplate include Mongoid::Document[详细]
2023-03-27 16:01 分类:问答Mongoid - One way references
Is it possible to do a one way reference in mongoid? I would like to do something like: class User include Mongoid::Document[详细]
2023-03-27 15:23 分类:问答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?[详细]
2023-03-27 09:36 分类:问答MongoDB/mongoid update_attributes method slow?
I have some code where I need to update a record in my mongoDB DB.So I first find the record and then I update the record.However, the records have lots of text data stored with them, so I don\'t want[详细]
2023-03-27 08:31 分类:问答Mongodb crashing all the time
I\'m running a single instance mongodb, and the database is crashing all the time. Anyone knows if this problem is related with running in a single instance?[详细]
2023-03-27 07:34 分类:问答Fabricators failing with mongoid from validation
I can\'t get my any test to run because every user I try to fabricate generates validation errors. I have the following test.[详细]
2023-03-25 22:05 分类:问答Capybara with a MongoDB/Mongoid Rails app (without SQL database)
Is it possible to use Capybara or Webrat开发者_运维技巧 in a Rails app which does not rely on ActiveRecord (no SQL database) ? My app is using MongoDB and Mongoid instead.Sure. Capybara nor webrat rel[详细]
2023-03-25 21:29 分类:问答get nearby locations of certain location with mongoid or rubygeocode
I have something like @office = Office.first @offices = Office.where(:status => \"active\") How do I get offices near @office from above variables,[详细]
2023-03-25 20:42 分类:问答