I have a model in a Rails/Mongoid application that I had initially set a key using key: uid (where :uid is an attribute)
This is a Padrino project.For some reason I am getting my second database loaded in the development environment, but not the test environment.This is probably very specific to my project, and it\'s un
When I call paginate with kaminari on a collection of embedded documents I get the following error: (Access to the collection for Document is not allowed since it is an embedded document, please acc
I have a problem with voteable_mongo gem when I want to validate voter id. In my app users vote for 开发者_StackOverflow社区offers and I would like to make validation for offer (only accepted users ca
Having a bit of a problem running multiple workers. When creating workers with rake jobs:work jobs run without and problem, even when invoking it multiple times, but when creating workers with ruby s
class Parent include Mongoid::Document embeds_many :children field :title end class Child include Mongoid::Document
Well, the title is self-explicative. But, let me elaborate a little better. First of all, I am using Mongoid, a Gem for using MongoDB with rails applications.
My query is dead simple, not sure what is going on: User.rb def self.find_house_number(house_number) User.where(\"house_number = ?\", house_number)
How would 开发者_Python百科one go about ordering two different classes? So say there\'s Class1 and Class2 that both have the same kind of field, how would I do (Class1 + Class2).asc(:field)?You can do
I have a model along the lines of: class City include Mongoid::Document field :name embeds_many :stores index [[\"stores.location\", Mongoid::GEO2D]]