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
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.
In normal circumstances on Rails, you could do
render :text => @config_file
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.
I have the following set in my controller, but I still get a minimal set of HTML tags in the document
render(:content_type => 'text/plain', :layout => false);
I've done something similar in .Net before, so it printed out a text file with \n
interpreted. How do I get that in Rails?