diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-17 21:00:13 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-05-17 21:00:13 +0300 |
commit | d1bce8ea75df00970f3d4a67587ceb64bf4ec905 (patch) | |
tree | bc6c9af3d218b0f32f75b19744e4314f05141be6 /app/models/blob_viewer/changelog.rb | |
parent | 17e799980f6aaa6b378469f3e237c713f293e079 (diff) |
Add auxiliary blob viewer for CHANGELOG
Diffstat (limited to 'app/models/blob_viewer/changelog.rb')
-rw-r--r-- | app/models/blob_viewer/changelog.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/models/blob_viewer/changelog.rb b/app/models/blob_viewer/changelog.rb new file mode 100644 index 00000000000..0464ae27f71 --- /dev/null +++ b/app/models/blob_viewer/changelog.rb @@ -0,0 +1,16 @@ +module BlobViewer + class Changelog < Base + include Auxiliary + include Static + + self.partial_name = 'changelog' + self.file_types = %i(changelog) + self.binary = false + + def render_error + return if project.repository.tag_count > 0 + + :no_tags + end + end +end |