diff options
Diffstat (limited to 'lib/arel/visitors/visitor.rb')
-rw-r--r-- | lib/arel/visitors/visitor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/visitors/visitor.rb b/lib/arel/visitors/visitor.rb index 8f9dd929e1..204657883f 100644 --- a/lib/arel/visitors/visitor.rb +++ b/lib/arel/visitors/visitor.rb @@ -15,8 +15,8 @@ module Arel DISPATCH end - def visit object - send dispatch[object.class], object + def visit object, attribute = nil + send dispatch[object.class], object, attribute rescue NoMethodError => e raise e if respond_to?(dispatch[object.class], true) superklass = object.class.ancestors.find { |klass| |