6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/active_material_icon/views/menu_item.rb', line 6
def build(item, options = {})
super(options.merge(id: item.id))
@label = [item.icon, " "].join(" ").html_safe + (helpers.render_in_context self, item.label)
@url = helpers.render_in_context self, item.url
@priority = item.priority
= nil
add_class "current" if item.current? assigns[:current_tab]
if url
text_node link_to label, url, item.html_options
else
span label, item.html_options
end
if item.items.any?
add_class "has_nested"
= (item)
end
end
|