rails view:
<%= link_to_remote 'weekly', :update => 'graph', :url =>{:controller => 'graph', :action => 'test_html', :text => 'weekly'} %>
graph controller: def test text = params[:text] || 'test' g = Gruff::Line.new(400) g.title = text data = [0,2,2,nil,nil] g.data(text,data) send_data(g.to_blob, :disposition => 'inline', :type => 'image/jpg', :filename => 'test.jpg') end def test_html render :text => " 'graph', :action => 'test', :text => params[:text]}\"" end