mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-25 16:03:48 +00:00
13 lines
274 B
Ruby
13 lines
274 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ProjectSnippet < Snippet
|
|
self.allow_legacy_sti_class = true
|
|
|
|
belongs_to :project
|
|
|
|
validates :project, presence: true
|
|
validates :secret, inclusion: { in: [false] }
|
|
|
|
scope :by_project, ->(project) { where(project: project) }
|
|
end
|