diff options
author | Josh Frye <joshfng@gmail.com> | 2016-03-10 04:58:41 +0300 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-03-10 05:03:28 +0300 |
commit | 449954ecc2ad0c1796b2949b79b56329c6ce2447 (patch) | |
tree | 9064bd0ef742e8514bc17859879fa74e7e4e65f4 /app/controllers/explore | |
parent | 60d0a20b3a0077df6404ad9ef02f1a2963ed4c02 (diff) |
Allow filtered dashboard/explore results to be paged. Fixes #14104
Diffstat (limited to 'app/controllers/explore')
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index 5b811db3068..8271ca87436 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -8,7 +8,7 @@ class Explore::ProjectsController < Explore::ApplicationController @projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present? @projects = filter_projects(@projects) @projects = @projects.sort(@sort = params[:sort]) - @projects = @projects.includes(:namespace).page(params[:page]).per(PER_PAGE) if params[:filter_projects].blank? + @projects = @projects.includes(:namespace).page(params[:page]).per(PER_PAGE) respond_to do |format| format.html @@ -23,7 +23,7 @@ class Explore::ProjectsController < Explore::ApplicationController def trending @projects = TrendingProjectsFinder.new.execute(current_user) @projects = filter_projects(@projects) - @projects = @projects.page(params[:page]).per(PER_PAGE) if params[:filter_projects].blank? + @projects = @projects.page(params[:page]).per(PER_PAGE) respond_to do |format| format.html @@ -39,7 +39,7 @@ class Explore::ProjectsController < Explore::ApplicationController @projects = ProjectsFinder.new.execute(current_user) @projects = filter_projects(@projects) @projects = @projects.reorder('star_count DESC') - @projects = @projects.page(params[:page]).per(PER_PAGE) if params[:filter_projects].blank? + @projects = @projects.page(params[:page]).per(PER_PAGE) respond_to do |format| format.html |