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

project_snippet.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7a80ad33d68dc698068443cd1c5124bf57078696 (plain)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

class ProjectSnippet < Snippet
  belongs_to :project

  validates :project, presence: true
  validates :secret, inclusion: { in: [false] }

  scope :by_project, ->(project) { where(project: project) }
end