I draw bar graphs in my app using gruff. In one view, 'compare', I want to show one graph for every 'step' my 'project' has. I imagine it something like this:
image_tag graph_step_path(step)
I've created a 'graph' action in the step controller and included a route. But now I'm kind of lost. How can my controller action return the correct image path to the image_tag function? Doing 'return' doesn't feel right. Or could I somehow directly include the image blob generated by gruff?
edit:
I've created a helper function that creates the graph and returns the file path.