debian-mirror-gitlab/app/controllers/explore/groups_controller.rb

9 lines
301 B
Ruby
Raw Normal View History

2015-09-11 14:41:01 +05:30
class Explore::GroupsController < Explore::ApplicationController
2014-09-02 18:07:02 +05:30
def index
@groups = Group.order_id_desc
2014-09-02 18:07:02 +05:30
@groups = @groups.search(params[:search]) if params[:search].present?
@groups = @groups.sort(@sort = params[:sort])
2015-04-26 12:48:37 +05:30
@groups = @groups.page(params[:page]).per(PER_PAGE)
2014-09-02 18:07:02 +05:30
end
end