Flowdock
method

config

Importance_0
v4.0.2 - Show latest stable - 0 notes - Class: Rails::DBConsole
config() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/commands/dbconsole.rb, line 82
    def config
      @config ||= begin
        cfg = begin
          YAML.load(ERB.new(IO.read("config/database.yml")).result)
        rescue SyntaxError, StandardError
          require APP_PATH
          Rails.application.config.database_configuration
        end

        cfg[environment] || abort("No database is configured for the environment '#{environment}'")
      end
    end
Register or log in to add new notes.