diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-03 17:03:21 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-03 17:03:21 -0800 |
commit | 9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6 (patch) | |
tree | ea807c0794b6262c91a3f503361e6930892d78d7 /activerecord/lib | |
parent | 639e044298eed903566086d297ae51a535082e73 (diff) | |
parent | 1ae543a180095efef5ad59eb9883748ca20cebcf (diff) | |
download | rails-9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6.tar.gz rails-9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6.tar.bz2 rails-9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6.zip |
Merge remote branch 'mikel/master'
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 4343bef3d4..ed7d2a045e 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -28,8 +28,8 @@ namespace :db do desc 'Create the database defined in config/database.yml for the current Rails.env - also makes test database if in development mode' task :create => :load_config do - # Make the test database at the same time as the development one - if Rails.env == 'development' + # Make the test database at the same time as the development one, if it exists + if Rails.env.development? && ActiveRecord::Base.configurations['test'] create_database(ActiveRecord::Base.configurations['test']) end create_database(ActiveRecord::Base.configurations[Rails.env]) |