From 32ad530b825f4cdac51e579306548ca695471039 Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Sun, 18 May 2008 16:11:08 -0700 Subject: rename refactor of circle --- lib/arel/sql/formatters.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/arel/sql') diff --git a/lib/arel/sql/formatters.rb b/lib/arel/sql/formatters.rb index 5eab65726e..cc7a1fa7d5 100644 --- a/lib/arel/sql/formatters.rb +++ b/lib/arel/sql/formatters.rb @@ -20,8 +20,8 @@ module Arel "#{expression.function_sql}(#{expression.attribute.to_sql(self)})" + (expression.alias ? " AS #{quote_column_name(expression.alias)}" : '') end - def select(select_sql, name) - "(#{select_sql}) AS #{quote_table_name(name.to_s)}" + def select(select_sql, table) + "(#{select_sql}) AS #{quote_table_name(table)}" end def value(value) @@ -67,24 +67,24 @@ module Arel quote(value, column) end - def select(select_sql, name) + def select(select_sql, table) "(#{select_sql})" end end class SelectStatement < Formatter - def select(select_sql, name) + def select(select_sql, table) select_sql end end class TableReference < Formatter - def select(select_sql, name) - "(#{select_sql}) AS #{quote_table_name(name)}" + def select(select_sql, table) + "(#{select_sql}) AS #{quote_table_name(table)}" end def table(table) - quote_table_name(table.name) + (table.name != name_for(table) ? " AS " + engine.quote_table_name(name_for(table)) : '') + quote_table_name(table.name) + (table.name != name_for(table) ? " AS " + quote_table_name(name_for(table)) : '') end end -- cgit v1.2.3