Hello, I'm building a header partial for a view. I call the partial as following:
<%= render :partial =>"project/header", :locals => {:right_header => 'BLAH BLAH'} %>
The header has a default right_header, but I'd like the option to overwrite it:
<div id="header">
<span class="right">
Standard Header here
</span>
</div>
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:
<% if right_header.empty? %>
default header....
<% else %>
<%= right_header %>
<% end %>
Suggestions? Am I passing this correctly to the partial with locals?
Thank you