diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-06-11 16:29:37 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-06-11 16:29:37 +0300 |
commit | 1418afc2d6e7699f08a1fc5f33b78ea847ac1451 (patch) | |
tree | 7f1cd2621237c4dd234651bd16d6e304989b731d /app/models/remote_mirror.rb | |
parent | 180dc237152d60d05e4f75d8c936e81ba783b6cd (diff) |
Avoid checking the user format in every url validation
Diffstat (limited to 'app/models/remote_mirror.rb')
-rw-r--r-- | app/models/remote_mirror.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb index 5cd222e18a4..c4b5dd2dc96 100644 --- a/app/models/remote_mirror.rb +++ b/app/models/remote_mirror.rb @@ -16,7 +16,7 @@ class RemoteMirror < ActiveRecord::Base belongs_to :project, inverse_of: :remote_mirrors - validates :url, presence: true, url: { protocols: %w(ssh git http https), allow_blank: true } + validates :url, presence: true, url: { protocols: %w(ssh git http https), allow_blank: true, enforce_user: true } before_save :set_new_remote_name, if: :mirror_url_changed? |