How to add support for additional ORM for the Rails 3.1 engine?

I just created the super simple Rails 3.1 engine https://github.com/millisami/mero_cms and it works.

It supports only ActiveRecord. Now I want to add an additional or just MongoId ORM to make it a bit agnostic.

Since devise supports MongoId too, I looked at its code, but my experience could not determine the moving parts of ruby.

So, is there anything / message elsewhere or an explanation of how to add custom custom ORM support to MongoId?

+5
source share
1 answer

, Devise, devise.rb /config/initializers/,

# == > ORM

"devise/orm/mongoid"

.

. , -

rails g model : .

Rails 3 github:

https://github.com/RailsApps/rails3-application-templates

:

rails new APP_NAME -m https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-mongoid-devise-template.rb -T -O

!

0

All Articles