diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 7 |
1 files changed, 4 insertions, 3 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 1dd72f349a..473ead2a7c 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -7,8 +7,9 @@ class AppGenerator < Rails::Generator::Base Config::CONFIG['ruby_install_name']) DATABASES = %w(mysql oracle postgresql sqlite2 sqlite3 frontbase) + DEFAULT_DATABASE = 'sqlite3' - default_options :db => (ENV["RAILS_DEFAULT_DATABASE"] || "sqlite3"), + default_options :db => (ENV["RAILS_DEFAULT_DATABASE"] || DEFAULT_DATABASE), :shebang => DEFAULT_SHEBANG, :freeze => false mandatory_options :source => "#{File.dirname(__FILE__)}/../../../../.." @@ -119,8 +120,8 @@ class AppGenerator < Rails::Generator::Base "Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v } opt.on("-d", "--database=name", String, - "Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite2/sqlite3).", - "Default: mysql") { |v| options[:db] = v } + "Preconfigure for selected database (options: #{DATABASES.join('/')}).", + "Default: #{DEFAULT_DATABASE}") { |v| options[:db] = v } opt.on("-f", "--freeze", "Freeze Rails in vendor/rails from the gems generating the skeleton", |