# Parsing text stored in database

**URL:** <https://discuss.rubyonrails.org/t/parsing-text-stored-in-database/27133>\
**Category:** rubyonrails-talk\
**Created:** [March 29, 2008, 1:34pm UTC](https://discuss.rubyonrails.org/t/parsing-text-stored-in-database/27133 "2008-03-29T13:34:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankaj1](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@pankaj1](https://discuss.rubyonrails.org/u/pankaj1)\
**Post date:** [March 29, 2008, 1:34pm UTC](https://discuss.rubyonrails.org/t/parsing-text-stored-in-database/27133/1 "2008-03-29T13:34:54Z")

</div>

Hi all There is a table called 'emails'. It has a field 'body' which contains the contents of the email. It contains rhtml code for ex \<%=@user.name\> When this text from database is included in the actual email to be sent for ex @email.body, then the rhtml text is not parsed, ie the @user.name stays as it is, and is not replaced by the name of the user. Can anyone suggest a solution? Regards, Pankaj

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [March 31, 2008, 4:25pm UTC](https://discuss.rubyonrails.org/t/parsing-text-stored-in-database/27133/2 "2008-03-31T16:25:17Z")

</div>

[http://www.google.com/search?hl=en&q=ruby+erb&btnG=Google+Search](http://www.google.com/search?hl=en&q=ruby+erb&btnG=Google+Search)
