From 3aaac5b646ecd73a2fc684896402b1456e5238d8 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 27 Jul 2010 17:22:40 -0700 Subject: PERF: fewer objects --- lib/arel/algebra/relations/relation.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/arel/algebra') 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 -- cgit v1.2.3