Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/service.rb')
-rw-r--r--app/models/service.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/service.rb b/app/models/service.rb
index e60dda59176..41ae197f432 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -32,7 +32,7 @@ class Service < ApplicationRecord
belongs_to :project, inverse_of: :services
has_one :service_hook
- validates :project_id, presence: true, unless: proc { |service| service.template? }
+ validates :project_id, presence: true, unless: -> { template? }
validates :type, presence: true
scope :visible, -> { where.not(type: 'GitlabIssueTrackerService') }
@@ -70,10 +70,6 @@ class Service < ApplicationRecord
true
end
- def template?
- template
- end
-
def category
read_attribute(:category).to_sym
end