diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 164f60356ebf8b14f2076e0ae8898cdea1cd072b..06f56d3928e74f83e5068cbd53b743e5f30a8348 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed that local database creation should consider 127.0.0.1 local #9026 [parcelbrat] + * Fixed that functional tests generated for scaffolds should use fixture calls instead of hard-coded IDs #10435 [boone] * Added db:migrate:redo and db:migrate:reset for rerunning existing migrations #10431, #10432 [matt] diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index e8fb3bb1a14ca1595ef92be29c330b5b581668ee..2ecd09af2f2824bc7a553011a358c59b1b8a62f9 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -16,7 +16,7 @@ namespace :db do # <<: *defaults next unless config['database'] # Only connect to local databases - if config['host'] == 'localhost' || config['host'].blank? + if %w( 127.0.0.1 localhost ).include?(config['host']) || config['host'].blank? create_database(config) else p "This task only creates local databases. #{config['database']} is on a remote host."