diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-02-19 10:55:13 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-02-19 22:04:08 +1300 |
commit | 8a1b6041c8af7007c80de87221e20512810be26d (patch) | |
tree | b02ed1a336400b64f26060e30c77162e568a0e68 /app/validators | |
parent | fe10964a6884162b9272ec3a32a5736c2a997ab2 (diff) | |
download | gitlab-ce-8a1b6041c8af7007c80de87221e20512810be26d.tar.gz |
Use Gitlab::CurrentSettings in UrlValidator
Gitlab::CurrentSettings will create ApplicationSetting.current if not
present which means we don't have to use `&.`. We can also more easily
use stub_application_setting in specs
Diffstat (limited to 'app/validators')
-rw-r--r-- | app/validators/url_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/url_validator.rb b/app/validators/url_validator.rb index d3e32818dc7..c85f5ba5cdb 100644 --- a/app/validators/url_validator.rb +++ b/app/validators/url_validator.rb @@ -93,6 +93,6 @@ class UrlValidator < ActiveModel::EachValidator end def allow_setting_local_requests? - ApplicationSetting.current&.allow_local_requests_from_hooks_and_services? + Gitlab::CurrentSettings.allow_local_requests_from_hooks_and_services? end end |