# Partials and locals

**URL:** <https://www.ruby-forum.com/t/partials-and-locals/188879>\
**Category:** Rails\
**Created:** [May 19, 2010, 8:20pm UTC](https://www.ruby-forum.com/t/partials-and-locals/188879 "2010-05-19T20:20:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![badnaam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e36b37/32.png) [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Post date:** [May 19, 2010, 8:20pm UTC](https://www.ruby-forum.com/t/partials-and-locals/188879/1 "2010-05-19T20:20:04Z")

</div>

I am calling a partial in another controller (benefits) like…

\<%= render :partial =\> “benefits/b\_index”, :collection =\> @benefits,  
:locals =\> {:hide\_list =\> true} %\>

in the partial i just cant seem to access the local variable

\<% if hide\_list == true %\> throws unknown variable error and \<% if  
@hide\_list == true %\> shows @hide\_list as nil

what am i doing wrong?
