lib/qme/database_access.rb in quality-measure-engine-1.0.4 vs lib/qme/database_access.rb in quality-measure-engine-1.1.0
- old
+ new
@@ -22,9 +22,13 @@
# @return [Mongo::Connection]
def get_db
if @db == nil
@db = Mongo::Connection.new(@db_host, @db_port).db(@db_name)
end
+ Mongoid.configure do |config|
+ config.master = Mongo::Connection.new(@db_host, @db_port).db(@db_name)
+ end
+
@db
end
end
end
\ No newline at end of file