spohlenz/mongomodel — pull request #26 by RevCBH (2012-03-28 05:11:26+00:00)
Title: Observer Support

Hi,

I've added support for ActiveModel::Observing to EmbeddedDocument and adde a MongoModel::Observer class to derive ActiveRecord-like observers from. Configuration of observers is similar to those for ActiveRecord, in application.rb just add something like:

config.mongomodel.observers = :some_observer, :another_one

I've added a simple spec to test the scenario, but I'm not an RSpec ninja, so there might be a cleaner way to do some of it. Let me know if you have any questions or if there's something you'd like me to fix.

- Ben