summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-09-06 17:48:57 +0800
committerMark Chao <mchao@gitlab.com>2018-10-30 15:44:55 +0800
commit32f9cf8ce3dd337bf3b1683c5872171c253f0d27 (patch)
treeda6f8077d458283ae1da56cbc9e282c87cdeba0a /lib
parent6580de78bb52323fcafaaf4d2e770590e4f1c586 (diff)
downloadgitlab-ce-32f9cf8ce3dd337bf3b1683c5872171c253f0d27.tar.gz
Add BlobPresenter for highlighting
Force FoundBlob to use BlobPresenter
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/search_results.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb
index f2795c739f5..3dbb0608a4f 100644
--- a/lib/gitlab/search_results.rb
+++ b/lib/gitlab/search_results.rb
@@ -4,6 +4,7 @@ module Gitlab
class SearchResults
class FoundBlob
include EncodingHelper
+ include Presentable
attr_reader :id, :filename, :basename, :ref, :startline, :data, :project_id
@@ -31,6 +32,10 @@ module Gitlab
def language_from_gitattributes
nil
end
+
+ def present
+ super(presenter_class: BlobPresenter)
+ end
end
attr_reader :current_user, :query, :per_page