aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJeremy W. Rowe <jeremy.w.rowe@gmail.com>2012-11-23 14:30:15 -0600
committerJeremy W. Rowe <jeremy.w.rowe@gmail.com>2013-01-16 15:12:31 -0600
commitc45980fe6e8200837b70482a177bbca87b654fdf (patch)
tree7094050710368e6a5a20a2d13ac59e92f93851a2 /railties/lib
parent555cb0afb5a8a8e98fc982edb9e09dfaafd46380 (diff)
downloadrails-c45980fe6e8200837b70482a177bbca87b654fdf.tar.gz
rails-c45980fe6e8200837b70482a177bbca87b654fdf.tar.bz2
rails-c45980fe6e8200837b70482a177bbca87b654fdf.zip
Fixes improper database name when a '.' is included while creating a new rails
application. EG: `rails new something.awesome.com` Conflicts: railties/CHANGELOG.md
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index e22be40381..b2d1be9b51 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -236,7 +236,7 @@ module Rails
end
def app_name
- @app_name ||= defined_app_const_base? ? defined_app_name : File.basename(destination_root)
+ @app_name ||= (defined_app_const_base? ? defined_app_name : File.basename(destination_root)).tr(".", "_")
end
def defined_app_name