Commit be142e6b authored by Robert Speicher's avatar Robert Speicher

Move the `version_check_enabled` check from view to helper

parent 48cfad90
module VersionCheckHelper
def version_status_badge
if Rails.env.production?
if Rails.env.production? && current_application_settings.version_check_enabled
image_tag VersionCheck.new.url
end
end
......
......@@ -5,8 +5,7 @@
- if current_user && current_user.admin?
%span= Gitlab::VERSION
%small= Gitlab::REVISION
- if current_application_settings.version_check_enabled
= version_status_badge
= version_status_badge
%p.slead
GitLab is open source software to collaborate on code.
%br
......
......@@ -49,7 +49,6 @@ describe 'help/index' do
def stub_helpers
allow(view).to receive(:markdown).and_return('')
allow(view).to receive(:current_application_settings).
and_return(double.as_null_object)
allow(view).to receive(:version_status_badge).and_return('')
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment