mongoid
rails g gives uninitialized constant Rack::Mongoid
I get this error when I run \'rails g\' (my app seems to run fine otherwise though, but I need to use a generator):[详细]
2023-03-25 07:33 分类:问答Mongoid and has_secure_password
I am trying to use rails 3.1 authentication using mongoid instead of active model class User include Mongoid::Document[详细]
2023-03-25 01:11 分类:问答RoR3+Mongoid: How to compare fields of collection/table when querying?
I have a structure that has both :id and a :group_id fields. I wish to retrieve all the data which :id equals :group_id.[详细]
2023-03-25 01:08 分类:问答Mongoid embeds_many with Rails fields_for
I have a model like this: class Search include Mongoid::Document embeds_many :terms accepts_nested_attributes_for :terms[详细]
2023-03-24 23:51 分类:问答Mongoid criteria for referenced relations
I have these 2 models: class Track include Mongoid::Document field :artist, type: String field :title, type: String[详细]
2023-03-24 19:05 分类:问答Why is mongo not connecting to my table by command line?
Everything connects properly in my app, but when I try to do so by command line I can\'t seem to connect.[详细]
2023-03-23 19:47 分类:问答Active model sending validation error twice during rack test.
I have a simple restful rails api set up to feed json responses, I have a model line.rb where i have following validations.[详细]
2023-03-23 18:37 分类:问答MongoDB (Mongoid) many-to-many relationship with additional data (additional fields)
Let\'s say that my models are User and Project. Each user can be assigned to many projects and each project can have many users assigned. This is a typical many to many relationship and could be store[详细]
2023-03-23 14:43 分类:问答Undefined method `serializable_hash' for array
I am using mongoid as my orm, and i call to_json on the result set. The initial implementation works fine, except for the fact that everything is loaded on the fly (as opposed to eager loading)[详细]
2023-03-23 13:50 分类:问答How to remove a record without destroying it?
I am using Mongoid and I have 2 models, Flow and Node with a referenced parent-child relationship. class Node[详细]
2023-03-22 18:56 分类:问答