From c86adf1f588307895aabfeee52df150e115c36c4 Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Fri, 1 Jul 2011 09:29:38 +0200 Subject: [PATCH] don't use ConnectionSwitcher in generic code --- lib/report/sql_statement.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/report/sql_statement.rb b/lib/report/sql_statement.rb index 07e98d3b11..7647880e84 100644 --- a/lib/report/sql_statement.rb +++ b/lib/report/sql_statement.rb @@ -74,7 +74,7 @@ class Report::SqlStatement # FIXME I'm ugly @sql ||= begin sql = "\n-- BEGIN #{desc}\n" \ - "-- DB: #{ConnectionSwitcher.config_name}\n" \ + "-- DB: #{ActiveRecord::Base.connection.current_database}\n" \ "SELECT\n#{select.map { |e| "\t#{e}" }.join ",\n"}" \ "\nFROM\n\t#{from.gsub("\n", "\n\t")}" \ "\n\t#{joins.map { |e| e.gsub("\n", "\n\t") }.join "\n\t"}" \