How to capture generated HTML and sending it in e-mail


#1

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


#2

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.


#3

Thank you, Phillip.

I will try that.

Sincerely,
Tadatoshi

On Oct 18, 9:36 pm, Phillip K. removed_email_address@domain.invalid


#4

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