diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 21:09:15 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 21:09:15 +0000 |
commit | 8831c2df7fa3f1bb567e284e4b8c0a4f441e74b3 (patch) | |
tree | 36b1b430075ff6e63524be14585dbb614e893e8c /app/models/snippet.rb | |
parent | 1c8fa70f9d0818e2a82089c8643a6e455bca47fd (diff) | |
download | gitlab-ce-8831c2df7fa3f1bb567e284e4b8c0a4f441e74b3.tar.gz |
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 8bba79bd944..233834dbaf9 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -301,6 +301,10 @@ class Snippet < ApplicationRecord repository.update!(shard_name: repository_storage, disk_path: disk_path) end + def can_cache_field?(field) + field != :content || MarkupHelper.gitlab_markdown?(file_name) + end + class << self # Searches for snippets with a matching title or file name. # |