I have an action on my controller named download which creates a tar
file and then sends the file (via send_file) to the user. Its working
but I will like to delete the file once it is sent. The tar file
should be temporary and only available for download and then deleted
from the server. Any idea on how to do this?
@app = App.find params[:id]
system('cd ‘+$firstname.lastname@example.org+’ && tar -cf ‘email@example.com+’.tar