title: How to generate a text file from a String for download in Ruby on Rails
body: <p>I'm building a website using Rails and I have a Model with some text type value store in MySQL database, I need to provide a download link for my users to download a "*.txt" file which contains those texts.</p>
  
  <p>what I've tried is to use <code>render :text =&gt; my_text</code>  but it's kind of ugly and the browser can't start a download .</p>
  
  <p>Not I'm trying to use CarrierWave and mount a output_file to my model , I want to build a method to generate a file from its text value. Any suggestion would be greatly appreciated. Thanks!</p>