2015-04-30 13:06:18 -04:00
|
|
|
class Explore::GroupsController < Explore::ApplicationController
|
2015-04-16 08:03:37 -04:00
|
|
|
skip_before_action :authenticate_user!,
|
2014-10-19 04:50:23 -04:00
|
|
|
:reject_blocked, :set_current_user_for_observers
|
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
|