# Mailer Template in Database

**URL:** <https://www.ruby-forum.com/t/mailer-template-in-database/107426>\
**Category:** Rails\
**Created:** [June 21, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/mailer-template-in-database/107426 "2007-06-21T18:09:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![randall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b38774/32.png) [@randall](https://www.ruby-forum.com/u/randall)\
**Post date:** [June 21, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/mailer-template-in-database/107426/1 "2007-06-21T18:09:31Z")

</div>

Hi,

I need to be able to save email templates in the database so that my  
client can make changes to the layout and text using a WYSIWYG editor.  
What I would like to do is enable him to completely change the template  
but keep placeholders (something like {name} {email etc.).

Does anyone know how to do this.

Thanks

Mike

---

<div class="post-metadata">

**Author:** ![randall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b38774/32.png) [@randall](https://www.ruby-forum.com/u/randall)\
**Post date:** [June 21, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/mailer-template-in-database/107426/2 "2007-06-21T18:27:59Z")

</div>

On Jun 21, 11:09 am, Mike R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Mike

Shopify uses Liquid for this. It’s simple to use, and you don’t have  
the danger of users entering any valid ruby code that gets blindly  
evaled.

> **[Liquid template language](https://shopify.github.io/liquid/)**
>
> Documentation for the Liquid template language, created by Shopify.
