I'm using ruby-graphviz inside a Ruby on Rails project (a web application). I'm generating my graph from a model and so far so good, but from what I understand the output method only enables me to generate the graph pictures as files.
This presents a problem for me because this means I first have to save the file, then serve it up again in the same action. This is inefficient and slow.
Ideally, I would like graphviz to output the resulting graph in some sort of string or base64 encoded format so that it wouldn't need to be saved in a file, just stored as a variable, and then I can call up that variable to display the graph in my view.
Is there a way to do that at the moment? I can't glean from the documentation if one can at the moment.
I'm using ruby-graphviz inside a Ruby on Rails project (a web application). I'm generating my graph from a model and so far so good, but from what I understand the output method only enables me to generate the graph pictures as files.
This presents a problem for me because this means I first have to save the file, then serve it up again in the same action. This is inefficient and slow.
Ideally, I would like graphviz to output the resulting graph in some sort of string or base64 encoded format so that it wouldn't need to be saved in a file, just stored as a variable, and then I can call up that variable to display the graph in my view.
Is there a way to do that at the moment? I can't glean from the documentation if one can at the moment.