From 20cd623aba6cc0c1b08b7d6fcf277633cfe236d4 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 29 Nov 2010 14:15:58 -0800 Subject: update statement supported --- lib/arel/visitors/depth_first.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/arel/visitors') diff --git a/lib/arel/visitors/depth_first.rb b/lib/arel/visitors/depth_first.rb index 19796b6e72..8ff4b4d162 100644 --- a/lib/arel/visitors/depth_first.rb +++ b/lib/arel/visitors/depth_first.rb @@ -61,6 +61,15 @@ module Arel alias :visit_Time :terminal alias :visit_TrueClass :terminal + def visit_Arel_Nodes_UpdateStatement o + visit o.relation + visit o.values + visit o.wheres + visit o.orders + visit o.limit + @block.call o + end + def visit_Array o o.each { |i| visit i } @block.call o -- cgit v1.2.3