zeus.ugent.be/lib/helpers/nav.rb
2016-10-03 22:33:52 +02:00

10 lines
263 B
Ruby

module NavigationHelper
def nav_items
navigables = items.select { |i| i[:navigable] }.sort_by { |x| x[:order] || 10000 }
navigables.each do |item|
is_active = @item_rep && @item_rep.path == item.path
yield item, is_active
end
end
end