2015-09-11 14:41:01 +05:30
|
|
|
class Explore::GroupsController < Explore::ApplicationController
|
2014-09-02 18:07:02 +05:30
|
|
|
def index
|
2016-01-14 18:37:52 +05:30
|
|
|
@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
|