aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes/function.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/nodes/function.rb')
-rw-r--r--lib/arel/nodes/function.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/nodes/function.rb b/lib/arel/nodes/function.rb
index b58eba7f38..3263ff9cd4 100644
--- a/lib/arel/nodes/function.rb
+++ b/lib/arel/nodes/function.rb
@@ -6,12 +6,12 @@ module Arel
def initialize expr, aliaz = nil
@expressions = expr
- @alias = aliaz
+ @alias = aliaz && SqlLiteral.new(aliaz.to_s)
@distinct = false
end
def as aliaz
- self.alias = SqlLiteral.new(aliaz)
+ self.alias = SqlLiteral.new(aliaz.to_s)
self
end
end