Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:06
What would you like to do?
How to download a bunch of files in Rails and save them?
require 'open-uri'
arr = ['', '']
arr.each do |url|
open(url.split('/').last, 'wb') do |file|
file << open(url).read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment