Reputation: 1
How do I export all my rendered view to an html file? I want to save the view to a file rather than display it to the screen. Is this possible?
Upvotes: 0
Views: 243
Reputation: 106872
Instead of render
call render_to_string
and save the returned string into an file.
(see: http://apidock.com/rails/AbstractController/Rendering/render_to_string)
Upvotes: 1
Reputation: 7070
This sort of sounds like Dynamic Page Caching. There is a Railscasts on this topic. It is rather dated, unless you subscribe (there is a revised version with subscription).
http://railscasts.com/episodes/169-dynamic-page-caching
Upvotes: 0