diff options
Diffstat (limited to 'lib/arel/visitors/visitor.rb')
-rw-r--r-- | lib/arel/visitors/visitor.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/arel/visitors/visitor.rb b/lib/arel/visitors/visitor.rb index 0730c15794..2d4b472ea3 100644 --- a/lib/arel/visitors/visitor.rb +++ b/lib/arel/visitors/visitor.rb @@ -1,8 +1,8 @@ module Arel module Visitors class Visitor - def accept object - visit object + def accept object, collector + visit object, collector end private @@ -18,8 +18,8 @@ module Arel DISPATCH[self.class] end - def visit object - send dispatch[object.class], object + def visit object, collector + send dispatch[object.class], object, collector rescue NoMethodError => e raise e if respond_to?(dispatch[object.class], true) superklass = object.class.ancestors.find { |klass| |