summaryrefslogtreecommitdiff
path: root/app/controllers/explore
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-12 15:37:00 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-12 15:37:00 -0700
commitf0cbbd70bba7c44e9b09a3472e6c2f6f58623150 (patch)
treeb99f56130b2c26b345c360570ee0a91204e6cd23 /app/controllers/explore
parent0f144f36bc5703ba745a8a6d1cde14fb694c4e34 (diff)
downloadgitlab-ce-f0cbbd70bba7c44e9b09a3472e6c2f6f58623150.tar.gz
Use same constant for amount of items per page
Diffstat (limited to 'app/controllers/explore')
-rw-r--r--app/controllers/explore/groups_controller.rb2
-rw-r--r--app/controllers/explore/projects_controller.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/explore/groups_controller.rb b/app/controllers/explore/groups_controller.rb
index ada7031fea4..c51a4a211a6 100644
--- a/app/controllers/explore/groups_controller.rb
+++ b/app/controllers/explore/groups_controller.rb
@@ -8,6 +8,6 @@ class Explore::GroupsController < ApplicationController
@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]).per(20)
+ @groups = @groups.page(params[:page]).per(PER_PAGE)
end
end
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb
index d664624fa69..b295f295bb1 100644
--- a/app/controllers/explore/projects_controller.rb
+++ b/app/controllers/explore/projects_controller.rb
@@ -11,17 +11,17 @@ class Explore::ProjectsController < ApplicationController
@projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present?
@projects = @projects.search(params[:search]) if params[:search].present?
@projects = @projects.sort(@sort = params[:sort])
- @projects = @projects.includes(:namespace).page(params[:page]).per(20)
+ @projects = @projects.includes(:namespace).page(params[:page]).per(PER_PAGE)
end
def trending
@trending_projects = TrendingProjectsFinder.new.execute(current_user)
- @trending_projects = @trending_projects.page(params[:page]).per(10)
+ @trending_projects = @trending_projects.page(params[:page]).per(PER_PAGE)
end
def starred
@starred_projects = ProjectsFinder.new.execute(current_user)
@starred_projects = @starred_projects.reorder('star_count DESC')
- @starred_projects = @starred_projects.page(params[:page]).per(10)
+ @starred_projects = @starred_projects.page(params[:page]).per(PER_PAGE)
end
end