diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2007-03-14 23:45:17 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2007-03-14 23:45:17 +0000 |
commit | 8a9496cb4e795e8b626117195d9f25f2b7e9c2f8 (patch) | |
tree | e6d49d2f13a40fdc9e0c9386d2fffc932ab37270 /railties | |
parent | d16aa4e0396e393bca888c97c5e4f3210a85773c (diff) | |
download | rails-8a9496cb4e795e8b626117195d9f25f2b7e9c2f8.tar.gz rails-8a9496cb4e795e8b626117195d9f25f2b7e9c2f8.tar.bz2 rails-8a9496cb4e795e8b626117195d9f25f2b7e9c2f8.zip |
Add environment variable RAILS_DEFAULT_DATABASE, which allows the builtin default of 'mysql' to be overridden.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6429 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index d95b7d80a8..12d56e0ccb 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Add environment variable RAILS_DEFAULT_DATABASE, which allows the builtin default of 'mysql' to be overridden. [Nicholas Seckar] + * Windows: include MinGW in RUBY_PLATFORM check. #2982 [okkez000@gmail.com, Kaspar Schiess] * Split out the basic plugin locator functionality into an abstract super class. Add a FileSystemLocator to do the job of checking the plugin_paths for plugins. Add plugin_locators configuration option which will iterate over the set of plugin locators and load each of the plugin loaders they return. Rename locater everywhere to locator. [Marcel Molina Jr.] 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 = {}) |