Re: ActionMailer from database

Matt Pelletier
Sun, 28 Aug 2005 08:51:06 -0000

On Aug 27, 2005, at 5:15 PM, Joshua Sierles wrote:

> I have a client who will be editing email templates via the
> browser. What would be the best way
> to get these to work with actionmailer? The client will have some
> {TAG} tags for interpolating some
> specific info. Is there already some way to get ActionMailer to use
> database templates, or a template
> from a variable?

Robby has posted a few articles about storing ERb in the database.

http://robbyonrails.com/articles/2005/06/10/storing-rails-erb-
templates-in-the-database-continued

Basically you store the raw ERb and just call:
render :inline => email_template.body

I don''t know if that''s what you were looking for.

Matt


>
> Thanks
> Joshua Sierles
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

Matt Pelletier
pelletierm-A1PILTyJ15gXhy9q4Lf3Ug@public.gmane.org