app/helpers/application_helper/navbar.rb
# FIXME: The 'active' below is an active section not an item. That is wrong.
# What works is the "legacy" part that compares @layout to item.id.
# This assumes that these matches -- @layout and item.id. Moving forward we
# need to remove that assumption. However to do that we need figure some way
# to identify the active menu item here.
The 'active' below is an active section not an item. That is wrong.
What works is the "legacy" part that compares @layout to item.id.
This assumes that these matches -- @layout and item.id. Moving forward we
need to remove that assumption. However to do that we need figure some way
to identify the active menu item here.
The ' active ' below is an active section not an item . That is wrong . What works is the " legacy " part that compares @layout to item . id . This assumes that these matches -- @layout and item . id . Moving forward we need to remove that assumption . However to do that we need figure some way to identify the active menu item here .
def item_nav_class(item)
      active = controller.menu_section_id(controller.params) || @layout.to_sym
      item.id.to_sym == active || item.id.to_sym == @layout.to_sym ? 'active' : nil
    end
def item_nav_class ( item ) active = controller . menu_section_id ( controller . params ) || @layout . to_sym item . id . to_sym == active || item . id . to_sym == @layout . to_sym ? 'active' : nil end
FIXME: The 'active' below is an active section not an item.
FIXME : The ' active ' below is an active section not an item .
# FIXME: remove @layout condition when every controller sets menu_section properly
item
<not_specific>