Permalink
Browse files

alias visitor_for to for

  • Loading branch information...
1 parent eef61ab commit 9742785d5c0c076056daf346bf4f37a8348fa412 @tenderlove tenderlove committed Oct 3, 2010
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/arel/nodes/node.rb
  2. +1 −0 lib/arel/visitors.rb
View
2 lib/arel/nodes/node.rb
@@ -22,7 +22,7 @@ def and right
#
# Maybe we should just use `Table.engine`? :'(
def to_sql engine = Table.engine
- viz = Visitors::ToSql.new engine
+ viz = Visitors.for engine
viz.accept self
end
end
View
1 lib/arel/visitors.rb
@@ -24,5 +24,6 @@ module Visitors
def self.visitor_for engine
ENGINE_VISITORS[engine]
end
+ class << self; alias :for :visitor_for; end
end
end

0 comments on commit 9742785

Please sign in to comment.