diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2013-04-24 21:36:28 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2013-04-24 21:37:11 +0200 |
commit | 1dac2edb016b7de260f16beea3b30d39e118d499 (patch) | |
tree | 8dd2a6b9467dd11b84614b6bd166bb1aca6c3623 | |
parent | b5ae43a4360b256d1dd78f55ce0c66c1470743fc (diff) | |
download | rails-1dac2edb016b7de260f16beea3b30d39e118d499.tar.gz rails-1dac2edb016b7de260f16beea3b30d39e118d499.tar.bz2 rails-1dac2edb016b7de260f16beea3b30d39e118d499.zip |
Use env == 'development' instead of env.development?
It's simpler to assume that passed env is just a string without any
extensions, especially when DatabaseTasks are intended to be used also
without rails.
-rw-r--r-- | activerecord/lib/active_record/tasks/database_tasks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index 5d3f34a9b0..019fb62152 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -175,7 +175,7 @@ module ActiveRecord def each_current_configuration(environment) environments = [environment] - environments << 'test' if environment.development? + environments << 'test' if environment == 'development' configurations = ActiveRecord::Base.configurations.values_at(*environments) configurations.compact.each do |configuration| |