Sha256: dfccc2325ea6d307f76abaddcd36c811171f8988ac407b6620081f90d74f31da

Contents?: true

Size: 438 Bytes

Versions: 188

Compression:

Stored size: 438 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc
  module Errors #:nodoc

    # This error is raised when trying to access a Mongo::Collection from an
    # embedded document.
    #
    # @example Create the error.
    #   InvalidCollection.new(Address)
    class InvalidCollection < MongoidError
      def initialize(klass)
        super(
          translate("invalid_collection", { :klass => klass.name })
        )
      end
    end
  end
end

Version data entries

188 entries across 96 versions & 4 rubygems

Version Path
mongoid-2.1.7 lib/mongoid/errors/invalid_collection.rb
mongoid-2.1.6 lib/mongoid/errors/invalid_collection.rb
mongoid-2.1.5 lib/mongoid/errors/invalid_collection.rb
mongoid-2.1.4 lib/mongoid/errors/invalid_collection.rb
mongoid-2.1.3 lib/mongoid/errors/invalid_collection.rb
mongoid-2.1.2 lib/mongoid/errors/invalid_collection.rb
mongoid-2.1.1 lib/mongoid/errors/invalid_collection.rb
mongoid-2.1.0 lib/mongoid/errors/invalid_collection.rb