Sha256: 0e1fe9c1f2913ab6d03b59592c8b444f01bcd2787ac6fe8ef276f7cafe390abc

Contents?: true

Size: 264 Bytes

Versions: 26

Compression:

Stored size: 264 Bytes

Contents

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
locomotive_cms-2.2.0 app/cells/locomotive/sub_menu_cell.rb
locomotive_cms-2.1.4 app/cells/locomotive/sub_menu_cell.rb
locomotive_cms-2.1.3 app/cells/locomotive/sub_menu_cell.rb
locomotive_cms-2.1.2 app/cells/locomotive/sub_menu_cell.rb
locomotive_cms-2.1.1 app/cells/locomotive/sub_menu_cell.rb
locomotive_cms-2.1.0 app/cells/locomotive/sub_menu_cell.rb