Methods

Class/Module Index [+]

Quicksearch

Mongoid::Sessions::Validators::Storage

Validates the options passed to :store_in.

Constants

VALID_OPTIONS

Public Instance Methods

validate(klass, options) click to toggle source

Validate the options provided to :store_in.

@example Validate the options.

Storage.validate(:collection_name)

@param [ Class ] klass The model class. @param [ Hash, String, Symbol ] options The provided options.

@since 3.0.0

# File lib/mongoid/sessions/validators/storage.rb, line 20
def validate(klass, options)
  if !options.is_a?(::Hash) || !valid_keys?(options)
    raise Errors::InvalidStorageOptions.new(klass, options)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.