Rendering a view in a file

Hey all,

What’s the preferred method of rendering a view to a file? Basically
I’d like to create a script that invokes an instance of my rails app
and then renders the view to a file. I’d prefer to do this without
an HTTP request (curl or whatever).

Thanks in advance!
Tim

Hi Tim,

Tim McIntyre wrote:

What’s the preferred method of rendering a view to a file?

Take a look at render_to_string. Renders your view to a string (rather
than
to a response to the browser) which can then be written to a file.

hth,
Bill