blob: 6045ec71c6e7290610dd4b480284995e9838fb63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
# frozen_string_literal: true
class ProjectSnippet < Snippet
belongs_to :project
validates :project, presence: true
validates :secret, inclusion: { in: [false] }
def web_url(only_path: nil)
Gitlab::Routing.url_helpers.project_snippet_url(project, self, only_path: only_path)
end
end
|