diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 21:08:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 21:08:08 +0300 |
commit | 83731155d997ae24c7e0cd5ffa6f0dba41bec6dc (patch) | |
tree | 31f785012137fda4ac9a470f4f07c961b42d0299 /app/models/snippet.rb | |
parent | 57a37ce99f297cddae12cb4d982b6d572f932bb4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 27e1778e9b6..5c2e03e4b9c 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -302,6 +302,10 @@ class Snippet < ApplicationRecord field != :content || MarkupHelper.gitlab_markdown?(file_name) end + def hexdigest + Digest::SHA256.hexdigest("#{title}#{description}#{created_at}#{updated_at}") + end + class << self # Searches for snippets with a matching title or file name. # |