gitlab-org--gitlab-foss/app/helpers/version_check_helper.rb
Phil Hughes 554afea059
Fix race condition with dispatcher.js
The dispatcher was trying to create a new instance of a class that is loaded in a file after main.js which would cause the filtered search to not work on issues. This would only happen on the first load when the JS is not cached. If the JS is cached, then everything will be fine.
2017-08-15 16:09:36 +01:00

8 lines
253 B
Ruby

module VersionCheckHelper
def version_status_badge
if Rails.env.production? && current_application_settings.version_check_enabled
image_url = VersionCheck.new.url
image_tag image_url, class: 'js-version-status-badge'
end
end
end