debian-mirror-gitlab/app/helpers/version_check_helper.rb
2018-11-20 20:47:30 +05:30

10 lines
325 B
Ruby

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'
end
end