Skip to content

Commit

Permalink
used revised string output format for graphviz
Browse files Browse the repository at this point in the history
  • Loading branch information
fields committed Jun 4, 2011
1 parent 150e7e5 commit 061080e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/instances_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ def graph_layout
# g.output (:png => '/Users/fields/Desktop/graph.png')

if params[:output] == "dot"
output = redirect { g.output(:output => "dot") }
output = g.output(:dot => String)
send_data output, :filename => "aws_graph_#{Time.now.strftime("%Y%m%d")}.dot", :type => 'text/vnd.graphviz'
else
output = redirect { g.output(:output => "png") }
output = g.output(:png => String)
send_data output, :filename => "aws_graph_#{Time.now.strftime("%Y%m%d")}.png", :type => 'image/png', :disposition => 'inline'
end
end
Expand Down

0 comments on commit 061080e

Please sign in to comment.