Module: Mongoid::Sessions::Validators::Storage
Overview
Validates the options passed to :store_in.
Constant Summary collapse
- VALID_OPTIONS =
[ :collection, :database, :session ]
Instance Method Summary collapse
-
#validate(klass, options) ⇒ Object
Validate the options provided to :store_in.
Instance Method Details
#validate(klass, options) ⇒ Object
Validate the options provided to :store_in.
21 22 23 24 25 |
# File 'lib/mongoid/sessions/validators/storage.rb', line 21 def validate(klass, ) if !.is_a?(::Hash) || !valid_keys?() raise Errors::InvalidStorageOptions.new(klass, ) end end |