Steve Prentice
2005-Mar-28 18:42 UTC
Using ActionView or ERb outside of the web application
Hello, I have an application that is using Rails for the web application and ActiveRecord on backend processing servers. (The backend machines just include environment.rb to set up the environment). My question is, on the backend machines, what''s the best way to run an action locally and save the response to a file? The action is really simple: just a @patch = Patch.find(id) to load the object, so maybe it would be easier to just use ERB directly? If ERB is the easiest way, should I just expose a method on the model that returns the ERB results? That might be more usable: puts Patch.find(id).ini. (The view for the action generates an INI type output, not HTML) Thanks for any pointers! -Steve