method

spec

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Resolver

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

spec(config) public

Returns an instance of ConnectionSpecification for a given adapter. Accepts a hash one layer deep that contains all connection information.

Example

config = { "production" => { "host" => "localhost", "database" => "foo", "adapter" => "sqlite3" } }
spec = Resolver.new(config).spec(:production)
spec.adapter_method
# => "sqlite3_connection"
spec.config
# => { "host" => "localhost", "database" => "foo", "adapter" => "sqlite3" }
Show source
Register or log in to add new notes.