Question

As the title says, how can i generate the default mongoid.yml config file on Rail 2.3.5?

I try to use the ´rails generate mongoid:config´ command but it just generates a new app.

And also, I would like to use has_many in mongoid without embedding the associated model in the same field. I would like them to be in separate fields and associated through a *_id "column". Is that possible?

Was it helpful?

Solution

You can't. The master branch of MongoID is only Rails 3 compatible. If you want use mongoID with Rails 2.3.5, you need using the 1.0.x branch of MongoID.

In this version, there are no mongoid generator. You need define you own initializer to connect with MongoDB.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top