Skip to content

Instantly share code, notes, and snippets.

@maxim
Created February 11, 2009 08:35
Show Gist options
  • Select an option

  • Save maxim/61918 to your computer and use it in GitHub Desktop.

Select an option

Save maxim/61918 to your computer and use it in GitHub Desktop.
def json_to_png_file(*args)
returning StringIO.new(Jaxer.json_to_png(*args)) do |s|
s.content_type = "image/png"
s.original_filename = "canvas_output.png"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment