How to save output "render :action=>:any_action" to a file?

I need to save the output of my rails app to a file. i.e. instead of
rendering a page when using “render :action=>:any_action” i want the
output to be saved to a file.

Anyone got any ideas?

Thanks
Chris

render_to_string is what i was after.

Hi,
Use render_to_string (ActionController::Base) and write string to file

Att.,
Romeu

-----Mensagem original-----
De: [email protected]
[mailto:[email protected]] Em nome de Chris
Enviada em: quinta-feira, 17 de agosto de 2006 09:08
Para: [email protected]
Assunto: [Rails] How to save output “render :action=>:any_action” to a
file?

I need to save the output of my rails app to a file. i.e. instead of
rendering a page when using “render :action=>:any_action” i want the
output to be saved to a file.

Anyone got any ideas?

Thanks
Chris


Posted via http://www.ruby-forum.com/.


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


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.1/421 - Release Date:
16/8/2006


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.1/421 - Release Date:
16/8/2006

render_to_string will do what you want. It returns a string of the
rendered
text, letting you do what you want with it.

Jason

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs