From 061080e5ac18b610036b1459929967471637f894 Mon Sep 17 00:00:00 2001 From: Adam Fields Date: Sat, 4 Jun 2011 09:04:19 -0400 Subject: [PATCH] used revised string output format for graphviz --- app/controllers/instances_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/instances_controller.rb b/app/controllers/instances_controller.rb index e50ea10..2171258 100644 --- a/app/controllers/instances_controller.rb +++ b/app/controllers/instances_controller.rb @@ -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