diff options
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index dd0684b88e..eeb5918f4b 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -65,7 +65,14 @@ module Arel end def select_clauses - attributes.collect { |a| a.to_sql(Sql::SelectClause.new(self)) } + attributes.map { |a| + case a + when Value + a.value + else + a.to_sql(Sql::SelectClause.new(self)) + end + } end def from_clauses |