Sha256: 91330ec4abdd276ce77e6260120938ca6efc61c2f0301f36098b2f1990f66428

Contents?: true

Size: 476 Bytes

Versions: 1

Compression:

Stored size: 476 Bytes

Contents

SimpleNavigation::Renderer::List.class_eval do
  alias old_render render
  def render(item_container)
    old_render(clean_up_html_options(item_container))
  end

  private
  #
  # Cleans the items from unused and not conform html_options
  #
  def clean_up_html_options(item_container)
   item_container.items.each do |item|
      html_options = item.html_options
      html_options.delete(:tooltip)
      item.html_options = html_options
   end

   item_container
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bookyt-0.0.1 lib/simple_navigation/renderer/list.rb