Class: Explore::GroupsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/explore/groups_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject


2
3
4
5
6
7
# File 'app/controllers/explore/groups_controller.rb', line 2

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])
end