diff options
author | Terence Lee <hone02@gmail.com> | 2012-04-03 21:59:24 -0500 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2012-04-03 21:59:24 -0500 |
commit | d46ad3460a5c8bffae1a907a11ba6ce3fec4de87 (patch) | |
tree | e87132a819c0d6b6e7ccf782b1bbf6c06dfd8b14 /activerecord | |
parent | 93f25ac6fc4493600c1648c1a60b12cc83790ad0 (diff) | |
download | rails-d46ad3460a5c8bffae1a907a11ba6ce3fec4de87.tar.gz rails-d46ad3460a5c8bffae1a907a11ba6ce3fec4de87.tar.bz2 rails-d46ad3460a5c8bffae1a907a11ba6ce3fec4de87.zip |
log which config format AR uses to connect with
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 96dc258288..13b7c6e214 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -72,9 +72,13 @@ module ActiveRecord # and then establishes the connection. initializer "active_record.initialize_database" do |app| ActiveSupport.on_load(:active_record) do + db_connection_type = "DATABASE_URL" unless ENV['DATABASE_URL'] + db_connection_type = "database.yml" self.configurations = app.config.database_configuration end + Rails.logger.info "Connecting to database specified by #{db_connection_type}" + establish_connection end end |