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:
commit
4e0ce3d6a5
2 changed files with 8 additions and 1 deletions
|
@ -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 }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue