require 'pathname' __DIR__ = Pathname.new(__FILE__).dirname.expand_path __LIB__ = __DIR__.join('..', 'lib').expand_path $:.unshift(__LIB__) unless $:.include?(__LIB__) require 'mm_to_view_model' MongoMapper::Document.plugin(MongoMapper::Plugins::ToViewModel) MongoMapper::EmbeddedDocument.plugin(MongoMapper::Plugins::ToViewModel)