- namespace = which_menu == 'admins_menu' ? 'admin_' : '' %ul - (collection = t which_menu).each do |base, title| - if can? :index, base.to_s.classify.constantize %li= link_to title, send(:"#{namespace}#{base}_path"), :class => top_menu_class(base) - if current_user.try(:admin?) and which_menu == 'top_menu' %li= link_to t('admins_menu_header'), admin_users_path, :class => top_menu_class('admin')