11# frozen_string_literal: true
22
33module BetterTogether
4- module NavigationItemsHelper # rubocop:todo Style/Documentation
4+ # rubocop:todo Metrics/ModuleLength
5+ module NavigationItemsHelper # rubocop:todo Style/Documentation, Metrics/ModuleLength
56 def better_together_nav_area
6- @better_together_nav_area ||= ::BetterTogether ::NavigationArea . find_by ( identifier : 'better-together' )
7+ # rubocop:todo Layout/IndentationWidth
8+ @better_together_nav_area ||= ::BetterTogether ::NavigationArea . find_by ( identifier : 'better-together' )
9+ # rubocop:enable Layout/IndentationWidth
710 end
811
912 # Retrieves navigation items for the BetterTogether header navigation.
@@ -79,7 +82,8 @@ def platform_footer_nav_area
7982 def mailer_footer_nav_items
8083 # Preload navigation items and their translations in a single query
8184 Mobility . with_locale ( current_locale ) do
82- @mailer_footer_nav_items ||= platform_footer_nav_area &.top_level_nav_items_includes_children . excluding_hashed || [ ]
85+ @mailer_footer_nav_items ||=
86+ platform_footer_nav_area &.top_level_nav_items_includes_children &.excluding_hashed || [ ]
8387 end
8488 end
8589
@@ -113,7 +117,8 @@ def platform_header_nav_items
113117 def mailer_header_nav_items
114118 # Preload navigation items and their translations in a single query
115119 Mobility . with_locale ( current_locale ) do
116- @mailer_header_nav_items ||= platform_header_nav_area . top_level_nav_items_includes_children . excluding_hashed || [ ]
120+ @mailer_header_nav_items ||=
121+ platform_header_nav_area . top_level_nav_items_includes_children . excluding_hashed || [ ]
117122 end
118123 end
119124
@@ -138,4 +143,5 @@ def current_locale
138143 I18n . locale
139144 end
140145 end
146+ # rubocop:enable Metrics/ModuleLength
141147end
0 commit comments