Skip to content

Instantly share code, notes, and snippets.

@ilake
Created January 22, 2010 09:25
Show Gist options
  • Save ilake/283648 to your computer and use it in GitHub Desktop.
Save ilake/283648 to your computer and use it in GitHub Desktop.
output = StringIO.new
gz = Zlib::GzipWriter.new(output)
gz.write(all_exchanges.to_json)
gz.close
render :text => output.string, :content_type => 'application/x-gzip' and return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment