method
validate_configuration!
v8.1.1 -
Show latest stable
- Class:
ActiveRecord::DatabaseConfigurations::HashConfig
validate_configuration!()private
No documentation available.
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 214
def validate_configuration!
if configuration_hash[:pool] && configuration_hash[:max_connections]
pool_val = configuration_hash[:pool].to_i
max_conn_val = configuration_hash[:max_connections].to_i
if pool_val != max_conn_val
raise "Ambiguous configuration: 'pool' (#{pool_val}) and 'max_connections' (#{max_conn_val}) are set to different values. Prefer just 'max_connections'."
end
end
if configuration_hash[:pool] && configuration_hash[:min_connections]
raise "Ambiguous configuration: when setting 'min_connections', use 'max_connections' instead of 'pool'."
end
end