debian-mirror-gitlab/app/controllers/explore/groups_controller.rb
2016-01-14 18:37:52 +05:30

8 lines
301 B
Ruby

class Explore::GroupsController < Explore::ApplicationController
def index
@groups = Group.order_id_desc
@groups = @groups.search(params[:search]) if params[:search].present?
@groups = @groups.sort(@sort = params[:sort])
@groups = @groups.page(params[:page]).per(PER_PAGE)
end
end