diff options
Diffstat (limited to 'lib/arel/algebra')
-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 b3dccaf8be..af97aa8344 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -71,7 +71,14 @@ module Arel end def where_clauses - wheres.collect { |w| w.to_sql(Sql::WhereClause.new(self)) } + wheres.collect { |w| + case w + when Value + w.value + else # FIXME: why do we have to pass in a whereclause? + w.to_sql(Sql::WhereClause.new(self)) + end + } end def group_clauses |