From 054b0103a8a833e643c954fb31b9a5d88e29968e Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Thu, 28 May 2009 18:08:48 -0300 Subject: This should be performed by the engine, if it does not exists, then create SQLLiteral not Attribute. --- lib/arel/engines/sql/formatters.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'lib') diff --git a/lib/arel/engines/sql/formatters.rb b/lib/arel/engines/sql/formatters.rb index ae80feb18e..22935ebff1 100644 --- a/lib/arel/engines/sql/formatters.rb +++ b/lib/arel/engines/sql/formatters.rb @@ -13,7 +13,6 @@ module Arel class SelectClause < Formatter def attribute(attribute) - # FIXME this should check that the column exists "#{quote_table_name(name_for(attribute.original_relation))}.#{quote_column_name(attribute.name)}" + (attribute.alias ? " AS #{quote(attribute.alias.to_s)}" : "") end -- cgit v1.2.3