Forum: Ruby on Rails How to capture generated HTML and sending it in e-mail

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.
Tadatoshi T. (Guest)
on 2008-10-18 23:13
(Received via mailing list)
Hi,

Is there a way to capture the generated HTML (e.g. for show.html.erb)
from inside a Rails application?

I need to send an e-mail to users with the same HTML as displayed on
the browser.

Thank you in advance.

Tadatoshi
Phillip K. (Guest)
on 2008-10-19 05:36
Tadatoshi T. wrote:
> Is there a way to capture the generated HTML (e.g. for show.html.erb)
> from inside a Rails application?

Have a look at render_to_string.

Peace.
Tadatoshi T. (Guest)
on 2008-10-19 07:00
(Received via mailing list)
Thank you, Phillip.

I will try that.

Sincerely,
Tadatoshi


On Oct 18, 9:36 pm, Phillip K. <removed_email_address@domain.invalid>
Tadatoshi T. (Guest)
on 2008-10-28 02:13
(Received via mailing list)
Hi, Phillip,

render_to_string worked very well.

Thank you for your help.

Sincerely,
Tadatoshi


On Oct 18, 10:59 pm, tadatoshi <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.