zeus.ugent.be/lib/helpers/nav.rb

11 lines
228 B
Ruby
Raw Normal View History

2016-07-31 19:28:23 +02:00
module NavigationHelper
def nav_items
navigables = items.select { |i| i[:navigable] }
navigables.each do |item|
is_active = @item_rep && @item_rep.path == item.path
yield item, is_active
end
end
end