Can I send rendered .html to somewhere besides the web serve

Is there any way to tell Rails to send the .html file it renders
somewhere other than the web server? I need to save a page to the
server’s file system instead of sending it to the user’s browser.

Thanks!
Bill

On 5/18/06, Bill W. [email protected] wrote:

Is there any way to tell Rails to send the .html file it renders somewhere
other than the web server? I need to save a page to the server’s file
system instead of sending it to the user’s browser.

http://api.rubyonrails.org/

Look up “render_to_string”

Thanks, James. I’ll check it out!

Best regards,
Bill
----- Original Message -----
From: “James L.” [email protected]
To: [email protected]
Sent: Thursday, May 18, 2006 10:12 AM
Subject: Re: [Rails] Can I send rendered .html to somewhere besides the
webserver?

On 5/18/06, Bill W. [email protected] wrote:

Is there any way to tell Rails to send the .html file it renders somewhere
other than the web server? I need to save a page to the server’s file
system instead of sending it to the user’s browser.

http://api.rubyonrails.org/

Look up “render_to_string”


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Hi Martin,

Thanks! I appreciate it very much.

Best regards,
Bill

----- Original Message -----
From: “Martin G.” [email protected]
To: [email protected]
Sent: Thursday, May 18, 2006 12:20 PM
Subject: Re: [Rails] Can I send rendered .html to somewhere besides
thewebserver?

To: [email protected]

[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Hi Bill,

This is from a recent post to this list:

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

I guess after that you can do whatever you want with outf …

cheers
Martin