aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/arel/algebra/relations/operations/where.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/algebra/relations/operations/where.rb b/lib/arel/algebra/relations/operations/where.rb
index 98efb72ec1..ed80fd93ba 100644
--- a/lib/arel/algebra/relations/operations/where.rb
+++ b/lib/arel/algebra/relations/operations/where.rb
@@ -15,5 +15,9 @@ module Arel
def eval
unoperated_rows.select { |row| predicates.all? { |p| p.eval(row) } }
end
+
+ def to_sql(formatter = nil)
+ compiler.select_sql
+ end
end
end