Forum: Ruby on Rails render_component and ActionMailer templates

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
subimage interactive (Guest)
on 2005-12-13 02:08
(Received via mailing list)
Hey gang,

I'm trying to make a call to render_component in an ActionMailer .rhtml
template, but I get this:

undefined method `render_component' for #<ActionView::Base:0x258ee88>

I tried calling it directly using ActionController::
Components.render_component, but that doesn't work either.

Are components supposed to be able to be called from ActionMailer or

My component basically grabs a snippet of text from my db to insert in
mailer. Is there a more Rails-ish way this could be accomplished without
using render_component?

This topic is locked and can not be replied to.