Module: Admin::MenuHelper

Defined in:
app/helpers/admin/menu_helper.rb

Instance Method Summary collapse

Instance Method Details

#header_tabs(group) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/helpers/admin/menu_helper.rb', line 5

def header_tabs(group)
  tag.ul(class: group.to_s) do
    safe_join(menu_items_for(group).map do |item|
      tag.li do
        path = instance_eval(&item.path)
        link_to(item.label,
                path,
                class: (current_menu_item?(item) ? "current" : ""))
      end
    end)
  end
end