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.
32a7dd6ad1b55d5f11c76fe38bd6af69?d=identicon&s=25 Tadatoshi Takahashi (tadatoshi)
on 2008-10-18 21: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
E3ba60e3dcb813f8abcd7732350e74cf?d=identicon&s=25 Phillip Koebbe (pkoebbe)
on 2008-10-19 03:36
Tadatoshi Takahashi 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.
32a7dd6ad1b55d5f11c76fe38bd6af69?d=identicon&s=25 Tadatoshi Takahashi (tadatoshi)
on 2008-10-19 05:00
(Received via mailing list)
Thank you, Phillip.

I will try that.

Sincerely,
Tadatoshi


On Oct 18, 9:36 pm, Phillip Koebbe <rails-mailing-l...@andreas-s.net>
32a7dd6ad1b55d5f11c76fe38bd6af69?d=identicon&s=25 Tadatoshi Takahashi (tadatoshi)
on 2008-10-28 01: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 <tadatoshi.mailingl...@gmail.com>
This topic is locked and can not be replied to.