I have a rails application that is running cron jobs and generating reports in the form of csv files. My question is what is best practice on where I should store these files before sending them to an sftp site? My thinking is as a tempfile or in the root and then delete the file after its sent?
There's no common place for this in a rails app file structure, so it's really up to you. As long as it's a known place on the file system then it should be fine. However, a couple of pointers: