Permalink
Browse files

minor revision to some new code in databases.rake

  • Loading branch information...
1 parent 17bf04f commit 9dd168c40262e850885fcb3dd0028b9067bb627f @fxn fxn committed Oct 24, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 activerecord/lib/active_record/railties/databases.rake
@@ -548,8 +548,9 @@ def drop_database_and_rescue(config)
end
def configs_for_environment
- environments = [Rails.env, ("test" if Rails.env.development?)]
- ActiveRecord::Base.configurations.values_at(*environments).compact
@vijaydev

vijaydev Oct 25, 2011

Member

The compact here is needed in case configuration for the test environment is missing. I've added it in ddce29b. Also added a check for the database key in the config as done in similar tasks earlier.

@fxn

fxn Oct 25, 2011

Owner

Good catch, thanks Vijay.

+ environments = [Rails.env]
+ environments << 'test' if Rails.env.development?
+ ActiveRecord::Base.configurations.values_at(*environments)
end
def session_table_name

0 comments on commit 9dd168c

Please sign in to comment.