# How can I render a partial from other controller?

**URL:** <https://www.ruby-forum.com/t/how-can-i-render-a-partial-from-other-controller/164322>\
**Category:** Rails\
**Created:** [March 31, 2009, 7:53am UTC](https://www.ruby-forum.com/t/how-can-i-render-a-partial-from-other-controller/164322 "2009-03-31T07:53:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![youhaodeyi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b9bd4f/32.png) [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Post date:** [March 31, 2009, 7:53am UTC](https://www.ruby-forum.com/t/how-can-i-render-a-partial-from-other-controller/164322/1 "2009-03-31T07:53:33Z")

</div>

I use this code to render a partial:

\<%= render :partial=\>‘test’ %\>

The test is not located in the current controller. How can I point it to  
other place?

---

<div class="post-metadata">

**Author:** ![youhaodeyi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b9bd4f/32.png) [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Post date:** [March 31, 2009, 7:59am UTC](https://www.ruby-forum.com/t/how-can-i-render-a-partial-from-other-controller/164322/2 "2009-03-31T07:59:38Z")

</div>

On 31 Mar., 07:53, Zhao Yi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I use this code to render a partial:
> 
> \<%= render :partial=\>‘test’ %\>
> 
> The test is not located in the current controller. How can I point it to  
> other place?

\<%= render :partial =\> ‘people/test’ %\>

In this case, the name of the controller is PeopleController. See the  
documentation for partial rendering:  
[http://api.rubyonrails.org/classes/ActionView/Partials.html](http://api.rubyonrails.org/classes/ActionView/Partials.html)

–  
Best regards,  
David K.  
[http://twitter.com/rubyguy](http://twitter.com/rubyguy)
