2018-12-05 23:21:45 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
class Explore::SnippetsController < Explore::ApplicationController
|
2019-12-04 20:38:33 +05:30
|
|
|
include Gitlab::NoteableMetadata
|
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
feature_category :snippets
|
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
def index
|
2019-12-21 20:55:43 +05:30
|
|
|
@snippets = SnippetsFinder.new(current_user, explore: true)
|
2019-12-04 20:38:33 +05:30
|
|
|
.execute
|
|
|
|
.page(params[:page])
|
2020-04-08 14:13:33 +05:30
|
|
|
.without_count
|
2019-12-04 20:38:33 +05:30
|
|
|
.inc_author
|
|
|
|
|
|
|
|
@noteable_meta_data = noteable_meta_data(@snippets, 'Snippet')
|
2015-09-25 12:07:36 +05:30
|
|
|
end
|
|
|
|
end
|