gitlab-org--gitlab-foss/app/helpers/version_check_helper.rb

13 lines
356 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2015-02-13 04:31:55 +00:00
module VersionCheckHelper
def version_status_badge
return unless Rails.env.production?
return unless Gitlab::CurrentSettings.version_check_enabled
return if User.single_user&.requires_usage_stats_consent?
image_url = VersionCheck.new.url
image_tag image_url, class: 'js-version-status-badge'
2015-02-13 04:31:55 +00:00
end
end