aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/algebra/predicates.rb1
-rw-r--r--lib/arel/algebra/relations/relation.rb9
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/arel/algebra/predicates.rb b/lib/arel/algebra/predicates.rb
index 4920bc9713..9764c4cfa2 100644
--- a/lib/arel/algebra/predicates.rb
+++ b/lib/arel/algebra/predicates.rb
@@ -141,6 +141,7 @@ module Arel
def to_sql(formatter = nil)
"#{operand1.to_sql} #{predicate_sql} #{operand1.format(operand2)}"
end
+ alias :value :to_sql
end
class CompoundPredicate < Binary
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb
index 9ff436ecb7..804ef5a09f 100644
--- a/lib/arel/algebra/relations/relation.rb
+++ b/lib/arel/algebra/relations/relation.rb
@@ -83,14 +83,7 @@ module Arel
end
def where_clauses
- 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
- }
+ wheres.map { |w| w.value }
end
def group_clauses