diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-02-22 16:37:10 +0100 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-02-22 16:37:10 +0100 |
commit | bb35c2d36f4f275cda650c1ad47595c287feba10 (patch) | |
tree | 2499f330737de0e26ecc5b4a744b7a3a218a173a /app/models/repository.rb | |
parent | 4e0a2e3c968cd6be218577b3a615b888822c99cf (diff) | |
download | gitlab-ce-bb35c2d36f4f275cda650c1ad47595c287feba10.tar.gz |
Added the contribution guide notice
This is shown at the creation of new issues and new merge requests, when
the repository has a contribution guide file.
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 99d908b5d81..009f5edd1df 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -134,6 +134,7 @@ class Repository Rails.cache.delete(cache_key(:commit_count)) Rails.cache.delete(cache_key(:graph_log)) Rails.cache.delete(cache_key(:readme)) + Rails.cache.delete(cache_key(:contribution_guide)) end def graph_log @@ -167,6 +168,12 @@ class Repository end end + def contribution_guide + Rails.cache.fetch(cache_key(:contribution_guide)) do + tree(:head).contribution_guide + end + end + def head_commit commit(self.root_ref) end |