diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 15:09:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 15:09:12 +0300 |
commit | 3ab4feda4dce9c9f0672375ae27c2f7c2ba6f4ad (patch) | |
tree | be5a771e0427ed98cdb58acfd5c631b4b2eb4bf9 /app/models | |
parent | c72e5ebe9938d315ec598197873e71a80168d40a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/service.rb | 6 |
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 |