I have a Linux configuration file stored in my database in Rails and I would like to be able to load the configuration through a web request
My goal on the Linux side is to twist / wget the webpage, compare it with the current configuration, and then hup on the server. This is easy enough to do in a script.
Under normal Rails conditions you can do
render :text => @config_file
However, I need to format the data first to apply static headers, etc. This is not a single line, so I need to be able to display the view.
I have the following set in my controller, but I still get the minimum set of HTML tags in the document
render(:content_type => 'text/plain', :layout => false);
I did something similar in .Net before, so it printed a text file with \n interpreted. How to get it in Rails?
Cody source share