+= association.target end block = embedded_docs.inject(block) do |chain, doc| if doc.class.respond_to?("_#{callback}_callbacks") lambda { doc.run_callbacks(callback, &chain) } else chain end end super callback, &block end
`_run_create_callbacks' from activesupport-3.0.9/lib/active_support/callbacks.rb:94:in `send' from activesupport-3.0.9/lib/active_support/callbacks.rb:94:in `run_callbacks' from mongo_mapper/plugins/embedded_callbacks.rb:28:in `run_callbacks' from mongo_mapper/plugins/embedded_callbacks.rb:23:in `run_callbacks'
that's good enough—good enough for your users, for future maintainers, for your own peace of mind. You'll find that you are more productive and your users are happier.