Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed that local database creation should consider 127.0.0.1 local (c…

…loses #9026) [parcelbrat]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit f60e3aa1aedb1500be7d73dffba32bdb06710bd6 1 parent 519c5c7
@dhh dhh authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  railties/CHANGELOG
  2. +1 −1  railties/lib/tasks/databases.rake
View
2  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]
View
2  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."
Please sign in to comment.
Something went wrong with that request. Please try again.