aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/railties
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-12-24 20:59:05 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-12-24 20:59:05 -0800
commit0daf80a8a6d0da16d132a68226c71e7a4c59dbc5 (patch)
treeaeb6474802cce63cfa3598c6da93b33f5069372b /activerecord/lib/active_record/railties
parent69cc645c70bdbd4e0a43f176a66197d6b07d1dd7 (diff)
parent38bc917bb584c218f86aeffba8b979d95a368193 (diff)
downloadrails-0daf80a8a6d0da16d132a68226c71e7a4c59dbc5.tar.gz
rails-0daf80a8a6d0da16d132a68226c71e7a4c59dbc5.tar.bz2
rails-0daf80a8a6d0da16d132a68226c71e7a4c59dbc5.zip
Merge pull request #4175 from kuroda/3-2-stable
Reconnect to the first database after db:create
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r--activerecord/lib/active_record/railties/databases.rake1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake
index 199eee4359..de299dbe91 100644
--- a/activerecord/lib/active_record/railties/databases.rake
+++ b/activerecord/lib/active_record/railties/databases.rake
@@ -38,6 +38,7 @@ db_namespace = namespace :db do
desc 'Create the database from config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config)'
task :create => :load_config do
configs_for_environment.each { |config| create_database(config) }
+ ActiveRecord::Base.establish_connection(configs_for_environment.first)
end
def mysql_creation_options(config)