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
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.
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.
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?
[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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs