Method: Rails::Initializer#initialize_database
- Defined in:
- lib/initializer.rb
#initialize_database ⇒ Object
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.
338 339 340 341 342 343 |
# File 'lib/initializer.rb', line 338 def initialize_database if configuration.frameworks.include?(:active_record) ActiveRecord::Base.configurations = configuration.database_configuration ActiveRecord::Base.establish_connection end end |