lib/rails_erd/diagram/graphviz.rb in rails-erd-1.4.6 vs lib/rails_erd/diagram/graphviz.rb in rails-erd-1.4.7
- old
+ new
@@ -181,10 +181,10 @@
GRAPH_ATTRIBUTES.each { |attribute, value| graph[attribute] = value }
NODE_ATTRIBUTES.each { |attribute, value| graph.node[attribute] = value }
EDGE_ATTRIBUTES.each { |attribute, value| graph.edge[attribute] = value }
# Switch rank direction if we're creating a vertically oriented graph.
- graph[:rankdir] = :TB if options.orientation == :vertical
+ graph[:rankdir] = (options.orientation == "vertical") ? :LR : :TB
# Title of the graph itself.
graph[:label] = "#{title}\\n\\n" if title
# Setup notation options.