Forum: Ruby on Rails Saving a rendered page as a file

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jang Choe (Guest)
on 2006-05-17 01:30
(Received via mailing list)
Is there any way to save a rendered page as a *.html file?

Thanks.
Mohammad (Guest)
on 2006-05-17 02:34
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
This topic is locked and can not be replied to.