Sha256: 5c78011da36ce3ed3243ef601bcdff5201d727d9b1f7742dcb131e2ccbfc2e19
Contents?: true
Size: 677 Bytes
Versions: 3
Compression:
Stored size: 677 Bytes
Contents
- raise('expected a page') unless page.present? - menu_children = page.menu_children - if menu_children.blank? && page.menu_parent&.menu_children.present? - menu_children = page.menu_parent&.menu_children - menu_children.group_by(&:menu_group).each do |menu_group, pages| - if menu_group.present? %h6= menu_group - pages.each do |page| - next unless EffectiveResources.authorized?(self, :show, page) - next if (page.authenticate_user || page.roles.present?) && current_user.blank? - next if page.roles.present? && (current_user.roles & page.roles).blank? = nav_link_to(page.menu_to_s, (page.menu_url.presence || effective_pages.page_path(page)))
Version data entries
3 entries across 3 versions & 1 rubygems