2018-09-23 19:44:14 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-09-08 13:49:20 +00:00
|
|
|
class Explore::SnippetsController < Explore::ApplicationController
|
2019-09-02 11:12:20 +00:00
|
|
|
include Gitlab::NoteableMetadata
|
|
|
|
|
2020-10-02 12:09:03 +00:00
|
|
|
feature_category :snippets
|
|
|
|
|
2015-09-08 13:49:20 +00:00
|
|
|
def index
|
2019-10-18 18:06:21 +00:00
|
|
|
@snippets = SnippetsFinder.new(current_user, explore: true)
|
2019-09-02 11:12:20 +00:00
|
|
|
.execute
|
|
|
|
.page(params[:page])
|
2020-02-25 21:09:23 +00:00
|
|
|
.without_count
|
2019-09-02 11:12:20 +00:00
|
|
|
.inc_author
|
2021-03-16 00:09:44 +00:00
|
|
|
.inc_statistics
|
2019-09-02 11:12:20 +00:00
|
|
|
|
|
|
|
@noteable_meta_data = noteable_meta_data(@snippets, 'Snippet')
|
2015-09-08 13:49:20 +00:00
|
|
|
end
|
|
|
|
end
|