instance method initialize_database

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

initialize_database()

This initialization routine does nothing unless :active_record is one of the frameworks to load (Configuration#frameworks). If it is, this sets the database configuration from Configuration#database_configuration and then establishes the connection.

Source
# File railties/lib/initializer.rb, line 389
    def initialize_database
      if configuration.frameworks.include?(:active_record)
        ActiveRecord::Base.configurations = configuration.database_configuration
        ActiveRecord::Base.establish_connection
      end
    end

Defined in railties/lib/initializer.rb line 389 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Initializer

Type at least 2 characters to search.

↑↓ navigate · open · esc close