Class: Explore::SnippetsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Gitlab::NoteableMetadata
Defined in:
app/controllers/explore/snippets_controller.rb

Instance Method Summary collapse

Methods included from Gitlab::NoteableMetadata

#noteable_meta_data

Instance Method Details

#indexObject


6
7
8
9
10
11
12
13
14
# File 'app/controllers/explore/snippets_controller.rb', line 6

def index
  @snippets = SnippetsFinder.new(current_user, explore: true)
    .execute
    .page(params[:page])
    .without_count
    .inc_author

  @noteable_meta_data = (@snippets, 'Snippet')
end