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)}
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)}
You can try the render_to_string method:
http://api.rubyonrails.com/classes/ActionController/Base.html#M000475
Regards
GA Gorter escribió:
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