# Render view (not partial view) from dynamic rhtml string

**URL:** <https://www.ruby-forum.com/t/render-view-not-partial-view-from-dynamic-rhtml-string/140613>\
**Category:** Rails\
**Created:** [June 16, 2008, 8:34pm UTC](https://www.ruby-forum.com/t/render-view-not-partial-view-from-dynamic-rhtml-string/140613 "2008-06-16T20:34:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![betame342](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/90db22/32.png) [@betame342](https://www.ruby-forum.com/u/betame342)\
**Post date:** [June 16, 2008, 8:34pm UTC](https://www.ruby-forum.com/t/render-view-not-partial-view-from-dynamic-rhtml-string/140613/1 "2008-06-16T20:34:40Z")

</div>

Hi,

Any one know how to render dynamic view (like render inline but for  
file) from database instead of file?

For example:  
instead of using “/comments/index.rhtml” as a view, it will  
automatically inject the a string of dynamic “rhtml” after calling  
comment controller with index action.

Hopefully, my question is not confusing

Thank you in advance

---

<div class="post-metadata">

**Author:** ![betame342](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/90db22/32.png) [@betame342](https://www.ruby-forum.com/u/betame342)\
**Post date:** [June 16, 2008, 8:58pm UTC](https://www.ruby-forum.com/t/render-view-not-partial-view-from-dynamic-rhtml-string/140613/2 "2008-06-16T20:58:14Z")

</div>

render :inline =\> my\_function\_that\_returns\_a\_string ?

On Jun 16, 2:34 pm, Beta B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![betame342](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/90db22/32.png) [@betame342](https://www.ruby-forum.com/u/betame342)\
**Post date:** [June 16, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/render-view-not-partial-view-from-dynamic-rhtml-string/140613/3 "2008-06-16T21:44:40Z")

</div>

julian wrote:

> render :inline =\> my\_function\_that\_returns\_a\_string ?
> 
> On Jun 16, 2:34ï¿½pm, Beta B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

you guys are rocks. I just realized, I can also use render :inline  
inside controller. Previously, I thought, I can only use it in the view  
file.

Thanks again
