Welcome to mirror list, hosted at ThFree Co, Russian Federation.

groups_controller.rb « explore « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 81883c543ba81cf4724cfaca346aec40619cae99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Explore::GroupsController < Explore::ApplicationController
  def index
    @groups = GroupsFinder.new(current_user).execute
    @groups = @groups.search(params[:filter_groups]) if params[:filter_groups].present?
    @groups = @groups.sort(@sort = params[:sort])
    @groups = @groups.page(params[:page])

    respond_to do |format|
      format.html
      format.json do
        render json: {
          html: view_to_html_string("explore/groups/_groups", locals: { groups: @groups })
        }
      end
    end
  end
end