title: Rails 3 render plaintext page using view
body: <p>I have a Linux configuration file stored in my database in Rails, and I'd like to be able to download the configuration through a web request</p>
  
  <p>My goal on the Linux side is to curl/wget the webpage, compare it to the current configuration, and then hup the server. Easy enough to do in a script.</p>
  
  <p>In normal circumstances on Rails, you could do </p>
  
  <pre><code>render :text =&gt; @config_file
  </code></pre>
  
  <p>However, I need to do some formatting of the data first to apply the static headers, etc. This isn't a one-liner, so I need to be able to render a view.</p>
  
  <p>I have the following set in my controller, but I still get a minimal set of HTML tags in the document</p>
  
  <pre><code>render(:content_type =&gt; 'text/plain', :layout =&gt; false);
  </code></pre>
  
  <p>I've done something similar in .Net before, so it printed out a text file with <code>\n</code> interpreted. How do I get that in Rails?</p>