Is there a way to have ARel write (sanitized, possibly aliased, etc.) column names into CONCAT() and other SQL functions?
ARel
CONCAT()
Here\'s how to do
Use NamedFunction:
NamedFunction
name = Arel::Attribute.new(Arel::Table.new(:countries), :name) func = Arel::Nodes::NamedFunction.new 'zomg', [name] Country.select([name, func]).to_sql