Sha256: 1db87f5153de9acb0da893560465710ebf46de6c3b5295a2d2da7952c33b432b

Contents?: true

Size: 566 Bytes

Versions: 46

Compression:

Stored size: 566 Bytes

Contents

# encoding: utf-8
module Mongoid
  module Errors

    # This error is raised when a default session is not defined.
    class NoDefaultSession < MongoidError

      # Create the new error with the defined session names.
      #
      # @example Create the new error.
      #   NoDefaultSession.new([ :secondary ])
      #
      # @param [ Array<Symbol> ] keys The defined sessions.
      #
      # @since 3.0.0
      def initialize(keys)
        super(
          compose_message("no_default_session", { keys: keys.join(", ") })
        )
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 6 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-4.0.2/lib/mongoid/errors/no_default_session.rb
mongoid-3.1.7 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.2 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.1 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.0 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.0.rc2 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.0.rc1 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.0.beta2 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.0.beta1 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.0.alpha2 lib/mongoid/errors/no_default_session.rb
mongoid-4.0.0.alpha1 lib/mongoid/errors/no_default_session.rb
mongoid-3.1.6 lib/mongoid/errors/no_default_session.rb
sepastian-mongoid-rails4-4.0.1.alpha lib/mongoid/errors/no_default_session.rb
sepastian-mongoid-rails4-4.0.0.alpha lib/mongoid/errors/no_default_session.rb
mongoid-3.1.5 lib/mongoid/errors/no_default_session.rb
mongoid_heroku_stable-4.0.0 lib/mongoid/errors/no_default_session.rb
mongoid_rails4-4.0.0 lib/mongoid/errors/no_default_session.rb
mongoid-3.1.4 lib/mongoid/errors/no_default_session.rb
mongoid-3.1.3 lib/mongoid/errors/no_default_session.rb
mongoid-3.1.2 lib/mongoid/errors/no_default_session.rb