Ruby 2.3.0 & Rails 4.2.4
I am currently trying to download some files using the Rails send_file method and receive a 'no_method' error. I am using ActiveAdmin to access .csv files stored in AWS and trying to create a batch_action that will download each file that I have selected by accessing a batch_download method. Why can't I seem to use the send_file method?
class File_Upload
def batch_download
send_file "file_name"
end
end
...
ActiveAdmin.register File_Upload do
batch_action :download, confirm "Are you sure?" do |id|
File_Upload.find(id).each {|file| file.batch_download}
end
end