# Rendering partials on another controller

**URL:** <https://www.ruby-forum.com/t/rendering-partials-on-another-controller/49631>\
**Category:** Rails\
**Created:** [November 23, 2005, 2:22am UTC](https://www.ruby-forum.com/t/rendering-partials-on-another-controller/49631 "2005-11-23T02:22:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanvega](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/9fc348/32.png) [@ivanvega](https://www.ruby-forum.com/u/ivanvega)\
**Post date:** [November 23, 2005, 2:22am UTC](https://www.ruby-forum.com/t/rendering-partials-on-another-controller/49631/1 "2005-11-23T02:22:12Z")

</div>

Hi,

I was trying to include a view inside my application.rhtml layout, and I  
found that render\_component seemed to be the answer. Unfortunately, it  
doesn’t understand the “:layout =\> false” option (like a normal render),  
and also doesn’t seem to be able to render partials at all.

So is there a way to do what I’m trying? short of using a custom layout  
on this “component” and deleting the default one?

I also tried using “render” directly inside the layout, but it doesn’t  
output anything at all.

Thanks in advance!

Ivan V.

---

<div class="post-metadata">

**Author:** ![ivanvega](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/9fc348/32.png) [@ivanvega](https://www.ruby-forum.com/u/ivanvega)\
**Post date:** [November 23, 2005, 2:00pm UTC](https://www.ruby-forum.com/t/rendering-partials-on-another-controller/49631/2 "2005-11-23T14:00:38Z")

</div>

If you have a partial in say, ‘app/views/users/\_form.rhtml’ and you want  
to  
render this from anywhere in your app you could use:  
render :partial=\>"/users/form"  
This will hopefully give you what you want. And since its a partial, you  
don’t need to use layout=\>false. The render\_components method is for  
rendering controllers/views from the components directory and is quite  
different.

Hope this helps!  
-Nick

---

<div class="post-metadata">

**Author:** ![ivanvega](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/9fc348/32.png) [@ivanvega](https://www.ruby-forum.com/u/ivanvega)\
**Post date:** [November 23, 2005, 4:26pm UTC](https://www.ruby-forum.com/t/rendering-partials-on-another-controller/49631/3 "2005-11-23T16:26:25Z")

</div>

I should have guessed it would be so simple… Thanks a lot!

Ivan V.

---

<div class="post-metadata">

**Author:** ![ivanvega](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/9fc348/32.png) [@ivanvega](https://www.ruby-forum.com/u/ivanvega)\
**Post date:** [November 23, 2005, 4:38pm UTC](https://www.ruby-forum.com/t/rendering-partials-on-another-controller/49631/4 "2005-11-23T16:38:30Z")

</div>

No problem. I still find myself trying to make things to complicated as  
well. 🙂
