Module: Mongoid::Config::Validators::Session
Overview
Validator for session specific configuration.
Constant Summary collapse
- STANDARD =
[ :database, :hosts, :username, :password ]
Instance Method Summary collapse
-
#validate(sessions) ⇒ Object
Validate the session configuration.
Instance Method Details
#validate(sessions) ⇒ Object
Validate the session configuration.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mongoid/config/validators/session.rb', line 20 def validate(sessions) unless sessions.has_key?(:default) raise Errors::NoDefaultSession.new(sessions.keys) end sessions.each_pair do |name, config| validate_session_database(name, config) validate_session_hosts(name, config) validate_session_uri(name, config) end end |