Commit be142e6b authored by Robert Speicher's avatar Robert Speicher

Move the `version_check_enabled` check from view to helper

parent 48cfad90
module VersionCheckHelper module VersionCheckHelper
def version_status_badge def version_status_badge
if Rails.env.production? if Rails.env.production? && current_application_settings.version_check_enabled
image_tag VersionCheck.new.url image_tag VersionCheck.new.url
end end
end end
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
- if current_user && current_user.admin? - if current_user && current_user.admin?
%span= Gitlab::VERSION %span= Gitlab::VERSION
%small= Gitlab::REVISION %small= Gitlab::REVISION
- if current_application_settings.version_check_enabled
= version_status_badge = version_status_badge
%p.slead %p.slead
GitLab is open source software to collaborate on code. GitLab is open source software to collaborate on code.
......
...@@ -49,7 +49,6 @@ describe 'help/index' do ...@@ -49,7 +49,6 @@ describe 'help/index' do
def stub_helpers def stub_helpers
allow(view).to receive(:markdown).and_return('') allow(view).to receive(:markdown).and_return('')
allow(view).to receive(:current_application_settings). allow(view).to receive(:version_status_badge).and_return('')
and_return(double.as_null_object)
end end
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