gitlab-org--gitlab-foss/app/helpers/version_check_helper.rb
Rémy Coutable a5517ada11 Merge branch 'frozen-string-enable-app-helpers' into 'master'
Enable frozen string for app/helpers/**/*.rb

See merge request gitlab-org/gitlab-ce!21320
2018-09-10 09:43:02 +00:00

12 lines
356 B
Ruby

# frozen_string_literal: true
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