2015-09-11 14:41:01 +05:30
|
|
|
class Explore::GroupsController < Explore::ApplicationController
|
2014-09-02 18:07:02 +05:30
|
|
|
def index
|
|
|
|
@groups = GroupsFinder.new.execute(current_user)
|
|
|
|
@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
|