title: Rails - Passing an option variable in a partial
body: <p>I'm building a header partial for a view. I call the partial as following:</p>
  
  <pre><code>&lt;%= render :partial =&gt;"project/header", :locals =&gt; {:right_header =&gt; 'BLAH BLAH'} %&gt;
  </code></pre>
  
  <p>The header has a default right_header, but I'd like the option to overwrite it:</p>
  
  <pre><code>&lt;div id="header"&gt;
  &lt;span class="right"&gt;
   Standard Header here
  &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The deal is when calling the partial, right_header won't always be defined, I'd like for it to be optional, but that's where I'm struggling and rails keeps erroring... In the partial I've been trying:</p>
  
  <pre><code>&lt;% if right_header.empty? %&gt;
   default header....
  &lt;% else %&gt;
   &lt;%= right_header %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Suggestions? Am I passing this correctly to the partial with locals?</p>
  
  <p>Thank you</p>