lib/mongoid.rb in mongoid-7.0.13 vs lib/mongoid.rb in mongoid-7.1.0.rc0
- old
+ new
@@ -1,6 +1,8 @@
+# frozen_string_literal: true
# encoding: utf-8
+
require "support/ruby_version"
require "delegate"
require "time"
require "set"
@@ -48,10 +50,15 @@
# Sets the Mongoid configuration options. Best used by passing a block.
#
# @example Set up configuration options.
# Mongoid.configure do |config|
# config.connect_to("mongoid_test")
+ #
+ # config.clients.default = {
+ # hosts: ["localhost:27017"],
+ # database: "mongoid_test",
+ # }
# end
#
# @return [ Config ] The configuration object.
#
# @since 1.0.0
@@ -100,7 +107,7 @@
#
# @example Delegate the configuration methods.
# Mongoid.database = Mongo::Connection.new.db("test")
#
# @since 1.0.0
- delegate(*(Config.public_instance_methods(false) - [ :logger=, :logger ]), to: Config)
+ delegate(*(Config.public_instance_methods(false) - [ :logger=, :logger ] << { to: Config }))
end