debian-mirror-gitlab/app/controllers/explore/snippets_controller.rb
2019-12-21 20:55:43 +05:30

17 lines
426 B
Ruby

# frozen_string_literal: true
class Explore::SnippetsController < Explore::ApplicationController
include PaginatedCollection
include Gitlab::NoteableMetadata
def index
@snippets = SnippetsFinder.new(current_user, explore: true)
.execute
.page(params[:page])
.inc_author
return if redirect_out_of_range(@snippets)
@noteable_meta_data = noteable_meta_data(@snippets, 'Snippet')
end
end