# Parsing text stored in database

**URL:** <https://www.ruby-forum.com/t/parsing-text-stored-in-database/133259>\
**Category:** Rails\
**Created:** [March 29, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/parsing-text-stored-in-database/133259 "2008-03-29T14:35:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [March 29, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/parsing-text-stored-in-database/133259/1 "2008-03-29T14:35:46Z")

</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:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [March 31, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/parsing-text-stored-in-database/133259/2 "2008-03-31T18: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)
