How can I create a mongoid.yml configuration in Rail 2.3.5?

As the name says, how can I generate the default mongoid.yml configuration file on Rail 2.3.5?

I try to use the'rails generate mongoid: config 'command, but it just creates a new application.

And also, I would like to use has_many in mongoid without embedding the related model in the same field. I would like them to be in different fields and be connected via the * _id column. Is it possible?

+3
source share
1 answer

You can not. The leading branch of MongoID is only compatible with Rails 3. If you want to use mongoID with Rails 2.3.5, you need to use the 1.0.x branch of MongoID.

. MongoDB.

+3

Source: https://habr.com/ru/post/1744760/


All Articles