How to download a bunch of files in Rails and save them?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|arr = ['http://example.com/file1.txt', 'http://example.com/file2.txt']|
|arr.each do |url||
|open(url.split('/').last, 'wb') do |file||
|file << open(url).read|