# Can partials be accessed from two views?

**URL:** <https://www.ruby-forum.com/t/can-partials-be-accessed-from-two-views/191650>\
**Category:** Rails\
**Created:** [July 15, 2010, 7:58pm UTC](https://www.ruby-forum.com/t/can-partials-be-accessed-from-two-views/191650 "2010-07-15T19:58:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakx12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Post date:** [July 15, 2010, 7:58pm UTC](https://www.ruby-forum.com/t/can-partials-be-accessed-from-two-views/191650/1 "2010-07-15T19:58:06Z")

</div>

For me to keep my application DRY i need to be able to have partials  
that can be accessed from two views. How is would I go about doing this?

Many thanks,

jakx12

---

<div class="post-metadata">

**Author:** ![jakx12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Post date:** [July 15, 2010, 8:09pm UTC](https://www.ruby-forum.com/t/can-partials-be-accessed-from-two-views/191650/2 "2010-07-15T20:09:25Z")

</div>

On Thu, Jul 15, 2010 at 2:58 PM, Zack N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> For me to keep my application DRY i need to be able to have partials  
> that can be accessed from two views. How is would I go about doing this?  
> render :partial =\> “folder/partial\_file”  
> That should be enough.

> Many thanks,

–  
Leonardo M…  
There’s no place like ~

---

<div class="post-metadata">

**Author:** ![jakx12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Post date:** [July 16, 2010, 8:04pm UTC](https://www.ruby-forum.com/t/can-partials-be-accessed-from-two-views/191650/3 "2010-07-16T20:04:24Z")

</div>

Further, you should strive to make all your partials accessible like  
this, by using :locals in the render and in the partial expecting  
variable, not @variable, if that makes sense.

Cheers
