2015-04-30 13:06:18 -04:00
|
|
|
class Explore::GroupsController < Explore::ApplicationController
|
2014-07-11 12:29:51 -04:00
|
|
|
def index
|
|
|
|
@groups = GroupsFinder.new.execute(current_user)
|
|
|
|
@groups = @groups.search(params[:search]) if params[:search].present?
|
|
|
|
@groups = @groups.sort(@sort = params[:sort])
|
2015-03-12 18:37:00 -04:00
|
|
|
@groups = @groups.page(params[:page]).per(PER_PAGE)
|
2014-07-11 12:29:51 -04:00
|
|
|
end
|
|
|
|
end
|