diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-10-26 00:41:41 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-10-26 00:41:41 +0530 |
commit | ddce29bfa12462fde2342a0c2bd0eefd420c0eab (patch) | |
tree | c7341eb86b959ae94c9540fa5b9c3d2356bf4879 /activerecord | |
parent | 7eaa2ee07b6086167716938ee6a82df514aa8eb9 (diff) | |
download | rails-ddce29bfa12462fde2342a0c2bd0eefd420c0eab.tar.gz rails-ddce29bfa12462fde2342a0c2bd0eefd420c0eab.tar.bz2 rails-ddce29bfa12462fde2342a0c2bd0eefd420c0eab.zip |
safeguard against configs missing environment or the database key
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index f8fa65ea87..44848b3391 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -550,7 +550,7 @@ end def configs_for_environment environments = [Rails.env] environments << 'test' if Rails.env.development? - ActiveRecord::Base.configurations.values_at(*environments) + ActiveRecord::Base.configurations.values_at(*environments).compact.reject { |config| config['database'].blank? } end def session_table_name |