Forum: Ruby on Rails HTML from view into controller

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.
GG9 R. (Guest)
on 2008-10-24 14:52
How can i get the html code create by a view into the controller

I need to save the html created into a view into a file
something like

 File.open( 'index.html', 'w' ){|file| file.write (The_view)}
Borja Martín (Guest)
on 2008-10-24 15:03
(Received via mailing list)
You can try the render_to_string method:
http://api.rubyonrails.com/classes/ActionControlle...

Regards

GA Gorter escribió:
This topic is locked and can not be replied to.