summaryrefslogtreecommitdiff
path: root/app/helpers/whats_new_helper.rb
blob: bbf5bde5904032641851e0e9eac497d90567bd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module WhatsNewHelper
  def whats_new_most_recent_release_items_count
    ReleaseHighlight.most_recent_item_count
  end

  def whats_new_storage_key
    most_recent_version = ReleaseHighlight.versions&.first

    return unless most_recent_version

    ['display-whats-new-notification', most_recent_version].join('-')
  end

  def whats_new_versions
    ReleaseHighlight.versions
  end
end