engine/app/cells/locomotive/sub_menu_cell.rb

13 lines
267 B
Ruby

module Locomotive
class SubMenuCell < MenuCell
protected
def build_item(name, attributes)
item = super
enhanced_class = "#{'on' if name.to_s == sections(:sub).to_s} #{item[:class]}"
item.merge(:class => enhanced_class)
end
end
end