1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #444 from alassek/dot-visitor-bind-param

Fix invalid BindParam output in Dot visitor
This commit is contained in:
Aaron Patterson 2016-08-26 15:48:51 -07:00 committed by GitHub
commit 4e0ce3d6a5
2 changed files with 8 additions and 1 deletions

View file

@ -204,7 +204,6 @@ module Arel
alias :visit_NilClass :visit_String
alias :visit_TrueClass :visit_String
alias :visit_FalseClass :visit_String
alias :visit_Arel_Nodes_BindParam :visit_String
alias :visit_Integer :visit_String
alias :visit_Fixnum :visit_String
alias :visit_BigDecimal :visit_String
@ -212,6 +211,8 @@ module Arel
alias :visit_Symbol :visit_String
alias :visit_Arel_Nodes_SqlLiteral :visit_String
def visit_Arel_Nodes_BindParam o; end
def visit_Hash o
o.each_with_index do |pair, i|
edge("pair_#{i}") { visit pair }

View file

@ -70,6 +70,12 @@ module Arel
@visitor.accept binary, Collectors::PlainString.new
end
end
def test_Arel_Nodes_BindParam
node = Arel::Nodes::BindParam.new
collector = Collectors::PlainString.new
assert_match '[label="<f0>Arel::Nodes::BindParam"]', @visitor.accept(node, collector).value
end
end
end
end