engine/app/cells/locomotive/sub_menu_cell.rb

12 lines
251 B
Ruby
Raw Normal View History

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