Skip to content

Commit

Permalink
Merge pull request #445 from oliverguenther/fix/dot-visitor-casted-node
Browse files Browse the repository at this point in the history
Add Arel::Nodes::Casted to dot visitor
  • Loading branch information
rafaelfranca committed Oct 7, 2016
2 parents 029041a + fbbe05e commit ea05e8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/arel/visitors/dot.rb
Expand Up @@ -156,6 +156,11 @@ def visit_Arel_Table o
visit_edge o, "name"
end

def visit_Arel_Nodes_Casted o
visit_edge o, 'val'
visit_edge o, 'attribute'
end

def visit_Arel_Attribute o
visit_edge o, "relation"
visit_edge o, "name"
Expand Down
1 change: 1 addition & 0 deletions test/visitors/test_dot.rb
Expand Up @@ -64,6 +64,7 @@ def test_named_function
Arel::Nodes::As,
Arel::Nodes::DeleteStatement,
Arel::Nodes::JoinSource,
Arel::Nodes::Casted,
].each do |klass|
define_method("test_#{klass.name.gsub('::', '_')}") do
binary = klass.new(:a, :b)
Expand Down

0 comments on commit ea05e8e

Please sign in to comment.