Commit be142e6b authored by Robert Speicher's avatar Robert Speicher
Browse files

Move the `version_check_enabled` check from view to helper

parent b40dfc0e7423
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 image_tag
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 @@ def stub_version(version, revision) ...@@ -49,7 +49,6 @@ def stub_version(version, revision)
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('')
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