charlotte-ruby/impressionist — pull request #31 by tute (2012-03-12 23:07:01+00:00)
Title: Adds mongo_mapper ORM support

Hi,

This is a rather big commit, with no tests, which works in a local MongoMapper app. Previous commit tests are passing.

Here I move ORM specific code from app/models to lib/impressionist/:orm/models, so it's not tied only to AR, and I add an Impression MM model.

The flow for an AR installation is the same as before, except it now adds a config/initializers/impression.rb config file on install for if we want to override the ORM used (the option is commented out, :active_record by default).

Running `rails g impressionist --orm mongo_mapper` only installs that file, no migrations of course, and when you set the mongo_mapper ORM option, Impressions are saved as MM documents.

If you need more tests or any other thing for merging it, please tell.

Thanks for the library,

Tute.