engine/app/cells/locomotive/sub_menu_cell.rb

12 lines
251 B
Ruby

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