diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-02 14:02:09 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-02 14:02:09 -0800 |
commit | 643afcbe00b766f786e6c7bac6cbd55870159df1 (patch) | |
tree | 157cd39f34306b30901547a511278af75bd4bb5c /app/controllers/dashboard_controller.rb | |
parent | ed3bd155fcd139ba1898fd4a29ff76924f6fe756 (diff) | |
download | gitlab-ce-643afcbe00b766f786e6c7bac6cbd55870159df1.tar.gz |
Reduce amount of sql queries on dashboard projects page
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r-- | app/controllers/dashboard_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index eca7b39bcdf..4930029e165 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -47,7 +47,7 @@ class DashboardController < ApplicationController @projects = @projects.where(namespace_id: Group.find_by(name: params[:group])) if params[:group].present? @projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present? - @projects = @projects.includes(:namespace) + @projects = @projects.includes(:namespace, :forked_from_project, :tags) @projects = @projects.tagged_with(params[:tag]) if params[:tag].present? @projects = @projects.sort(@sort = params[:sort]) @projects = @projects.page(params[:page]).per(30) |