# Replacing "\<contact-form\>" with Partial \_contact\_form.rhtml

**URL:** <https://www.ruby-forum.com/t/replacing-contact-form-with-partial-contact-form-rhtml/115971>\
**Category:** Rails\
**Created:** [October 1, 2007, 4:13am UTC](https://www.ruby-forum.com/t/replacing-contact-form-with-partial-contact-form-rhtml/115971 "2007-10-01T04:13:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [October 1, 2007, 4:13am UTC](https://www.ruby-forum.com/t/replacing-contact-form-with-partial-contact-form-rhtml/115971/1 "2007-10-01T04:13:04Z")

</div>

\<%= @website\_page.description.replace(“what”, :partial =\> “punam”) %\>

---

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [October 1, 2007, 4:15am UTC](https://www.ruby-forum.com/t/replacing-contact-form-with-partial-contact-form-rhtml/115971/2 "2007-10-01T04:15:33Z")

</div>

Bob S. wrote:

> \<%= @website\_page.description.replace(“what”, :partial =\> “punam”) %\>

Accidentally hit the return. My apologies! Please disregard the above.

If I wanted to replace the tag “” with the partial named  
\_contact\_form.rhtml (:contact\_form), how would I do so?

I thought it could work something like this:

\<%= @website\_page.description.gsub("", :partial =\>  
“contact\_form”) %\>

but then I got some errors with trying to replace a string with a hash.

Any ideas?
