Forum: Ruby on Rails render_component and ActionMailer templates

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.
Efe398b3b5436b0a8d4430090e8f86ea?d=identicon&s=25 subimage interactive (Guest)
on 2005-12-13 01: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
not?

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

Thanks...
This topic is locked and can not be replied to.