title: Creating file dynamically and downloading onto user's computer
body: <p>I'm wondering if it's possible to do this in Rails:</p>
  
  <p>Have a link on the webpage. When the user clicks on the link, the controller generates a file dynamically (say, a text file that contains a single random number between 1 and 10), and the file is downloaded onto the user's computer. The file might be temporarily stored on the server, but it shouldn't be permanently there.</p>