Skip to content

changed the depreciated methods according to ruby-graphviz gem ~> 1.0.8 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rails_assviz.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#Checks for active_support
begin
require 'active_support'
require 'active_support/all'
rescue LoadError
raise "Install the Ruby on Rails gem: gem install rails"
return false
Expand Down Expand Up @@ -169,11 +169,11 @@ def stop_executing(options={})

nodes.each do |node|
label = @options[:exclude_fields] ? node[0] : node[0] + ( node[1].count > 0 ? "|" + node[1].join("|") : "")
g.add_node(node[0], :label => label )
g.add_nodes(node[0], :label => label )
end

edges.each do |edge|
e=g.add_edge(edge[0],edge[2])
e=g.add_edges(edge[0],edge[2])
e.fontcolor = font_colors[edge[1]].nil? ? font_colors["default"] : font_colors[edge[1]]
e.label = edge[1].to_s
(edge[1] == "has_one" || edge[1] == "embeds_one") ? e.arrowhead="none" : e.arrowhead="crow"
Expand Down