diff options
Diffstat (limited to 'railties/lib/rails_generator/generators/applications/app/app_generator.rb')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 742a56e843..6c93fe14f8 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -7,7 +7,8 @@ class AppGenerator < Rails::Generator::Base DATABASES = %w(mysql oracle postgresql sqlite2 sqlite3 frontbase) - default_options :db => "mysql", :shebang => DEFAULT_SHEBANG, :freeze => false + default_options :db => (ENV["RAILS_DEFAULT_DATABASE"] || "mysql"), + :shebang => DEFAULT_SHEBANG, :freeze => false mandatory_options :source => "#{File.dirname(__FILE__)}/../../../../.." def initialize(runtime_args, runtime_options = {}) |