lib/mongoid.rb in mongoid-3.0.0.rc vs lib/mongoid.rb in mongoid-3.0.0

- old
+ new

@@ -30,11 +30,10 @@ require "active_support/time_with_zone" require "active_model" require "origin" require "moped" -BSON = Moped::BSON require "mongoid/extensions" require "mongoid/errors" require "mongoid/threaded" require "mongoid/relations" @@ -44,18 +43,18 @@ require "mongoid/config" require "mongoid/contextual" require "mongoid/copyable" require "mongoid/criteria" require "mongoid/dirty" +require "mongoid/evolvable" require "mongoid/factory" require "mongoid/fields" require "mongoid/finders" require "mongoid/hierarchy" require "mongoid/identity_map" require "mongoid/indexes" require "mongoid/inspection" -require "mongoid/javascript" require "mongoid/json" require "mongoid/loggable" require "mongoid/matchers" require "mongoid/multi_parameter_attributes" require "mongoid/nested_attributes" @@ -111,13 +110,29 @@ # @since 1.0.0 def configure block_given? ? yield(Config) : Config end + # Convenience method for getting the default session. + # + # @example Get the default session. + # Mongoid.default_session + # + # @return [ Moped::Session ] The default session. + # + # @since 3.0.0 def default_session Sessions.default end + # Convenience method for getting a named session. + # + # @example Get a named session. + # Mongoid.session(:default) + # + # @return [ Moped::Session ] The named session. + # + # @since 3.0.0 def session(name) Sessions.with_name(name) end # Take all the public instance methods from the Config singleton and allow