method
resolve
v4.1.8 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver
resolve(config)public
Returns a hash with database connection information.
Examples
Full hash Configuration.
configurations = { "production" => { "host" => "localhost", "database" => "foo", "adapter" => "sqlite3" } } Resolver.new(configurations).resolve(:production) # => { "host" => "localhost", "database" => "foo", "adapter" => "sqlite3"}
Initialized with URL configuration strings.
configurations = { "production" => "postgresql://localhost/foo" } Resolver.new(configurations).resolve(:production) # => { "host" => "localhost", "database" => "foo", "adapter" => "postgresql" }