I'm currently trying to send multiple files outside of my application using Rails send_file method. It loops through all of the files, but only sends the last one in the directory. Here is my code.
Dir.foreach(@dir) do |entry|
if entry != "." && entry != ".." && entry != ".DS_Store" && entry != ".title"
send_file(@dir + entry, :disposition => 'inline')
logger.info("File: " + @dir + entry)
end
end
Any help is appreciated!