I'm pretty new to rails and haml. I've got a breadcrumb that I want to render with partials and I want to pass a variable to the partial so that the correct item gets the "enabled" class. Here's what I tried:
= render 'nav_breadcrumb', :locals => {:page1 => true}
and on my _nav_breadcrumb.html.haml page I have this:
.overlay-breadcrumb.clearfix
%span{:class => ("enabled" if :page1)}
%span 1
%span{:class => ("enabled" if :page2)}
%span 2
%span{:class => ("enabled" if :page3)}
%span 3
The problem is, all 3 are getting the enabled class, regardless of the given render variable.