From 1dac2edb016b7de260f16beea3b30d39e118d499 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 24 Apr 2013 21:36:28 +0200 Subject: 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. --- activerecord/lib/active_record/tasks/database_tasks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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| -- cgit v1.2.3