summaryrefslogtreecommitdiff
path: root/app/models/project_snippet.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-13 15:08:52 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-13 15:08:52 +0000
commit0ab47b994caa80c5587f33dc818626b66cfdafe2 (patch)
tree5ef3976d2f84e3368903a67ba2dbd87a74b9a43c /app/models/project_snippet.rb
parent1308dc5eb484ab0f8064989fc551ebdb4b1a7976 (diff)
downloadgitlab-ce-0ab47b994caa80c5587f33dc818626b66cfdafe2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project_snippet.rb')
-rw-r--r--app/models/project_snippet.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_snippet.rb b/app/models/project_snippet.rb
index ffb08e10f1f..6045ec71c6e 100644
--- a/app/models/project_snippet.rb
+++ b/app/models/project_snippet.rb
@@ -5,4 +5,8 @@ class ProjectSnippet < Snippet
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