summaryrefslogtreecommitdiff
path: root/app/helpers/whats_new_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/whats_new_helper.rb')
-rw-r--r--app/helpers/whats_new_helper.rb20
1 files changed, 7 insertions, 13 deletions
diff --git a/app/helpers/whats_new_helper.rb b/app/helpers/whats_new_helper.rb
index 283d443f51b..bbf5bde5904 100644
--- a/app/helpers/whats_new_helper.rb
+++ b/app/helpers/whats_new_helper.rb
@@ -1,25 +1,19 @@
# frozen_string_literal: true
module WhatsNewHelper
- include Gitlab::WhatsNew
-
def whats_new_most_recent_release_items_count
- Gitlab::ProcessMemoryCache.cache_backend.fetch('whats_new:release_items_count', expires_in: CACHE_DURATION) do
- whats_new_release_items&.count
- end
+ ReleaseHighlight.most_recent_item_count
end
def whats_new_storage_key
- return unless whats_new_most_recent_version
+ most_recent_version = ReleaseHighlight.versions&.first
- ['display-whats-new-notification', whats_new_most_recent_version].join('-')
- end
+ return unless most_recent_version
- private
+ ['display-whats-new-notification', most_recent_version].join('-')
+ end
- def whats_new_most_recent_version
- Gitlab::ProcessMemoryCache.cache_backend.fetch('whats_new:release_version', expires_in: CACHE_DURATION) do
- whats_new_release_items&.first&.[]('release')
- end
+ def whats_new_versions
+ ReleaseHighlight.versions
end
end