I am generating QR codes from Google's charting API on my website as a URL with some params passed in.
I have around 100 of these codes which are generated from a URL, something like this:
$= image_tag("http://chart.apis.google.com/chart?cht=qr&chl=#{qr.code}&chs=120x120&choe=UTF-8", :size => "120x120")
I want to create a method that loops through my array and generates the png files, then places them inside a zip file which I can download from one click.
I tried using send_data "url", :disposition = > "attachment", :type => "image/png"
This only saved the URL, not the image generated. Putting the URL into the browser opened a window with the image.
Other than that I was not able to add all the files into a zip file. Does Rails have its own built-in compression methods?