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.
4b875f7fe147af4ceaa337a9a5699c9e?d=identicon&s=25 Jang Choe (Guest)
on 2006-05-16 23:30
(Received via mailing list)
Is there any way to save a rendered page as a *.html file?

Thanks.
0a36dd2d45a8cead5dcfd27a9346f620?d=identicon&s=25 Mohammad (Guest)
on 2006-05-17 00: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.