Permalink
Browse files

safeguard against configs missing environment or the database key

  • Loading branch information...
vijaydev committed Oct 25, 2011
1 parent 7eaa2ee commit ddce29bfa12462fde2342a0c2bd0eefd420c0eab
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit ddce29b

Please sign in to comment.