Skip to content

Commit

Permalink
Support query attrs and bind params in dot output
Browse files Browse the repository at this point in the history
  • Loading branch information
eileencodes committed May 1, 2020
1 parent b74256b commit ff8f40e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion activerecord/lib/arel/visitors/dot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,13 @@ def visit_String(o)
alias :visit_Symbol :visit_String
alias :visit_Arel_Nodes_SqlLiteral :visit_String

def visit_Arel_Nodes_BindParam(o); end
def visit_Arel_Nodes_BindParam(o)
edge("value") { visit o.value }
end

def visit_ActiveRecord_Relation_QueryAttribute(o)
edge("value_before_type_cast") { visit o.value_before_type_cast }
end

def visit_Hash(o)
o.each_with_index do |pair, i|
Expand Down

0 comments on commit ff8f40e

Please sign in to comment.