gitlab-org--gitlab-foss/app/controllers/explore/groups_controller.rb
Ciro Santilli b66a152735 Factor abilities methods
in app controller, user model and services.
2014-10-19 11:12:39 +02:00

13 lines
438 B
Ruby

class Explore::GroupsController < ApplicationController
skip_before_filter :authenticate_user!,
:reject_blocked, :set_current_user_for_observers
layout "explore"
def index
@groups = GroupsFinder.new.execute(current_user)
@groups = @groups.search(params[:search]) if params[:search].present?
@groups = @groups.sort(@sort = params[:sort])
@groups = @groups.page(params[:page]).per(20)
end
end