Saving a rendered page as a file


#1

Is there any way to save a rendered page as a *.html file?

Thanks.


#2

Jang Choe wrote:

Is there any way to save a rendered page as a *.html file?

Thanks.
@render = render :action => controller.action_name
outf = File.open(Time.now + “.html”,“w”)
outf.puts @render
outf.close