diff options
| author | gitlabhq <m@gitlabhq.com> | 2011-11-15 04:09:07 -0500 |
|---|---|---|
| committer | gitlabhq <m@gitlabhq.com> | 2011-11-15 04:09:07 -0500 |
| commit | 6b9f221a278ebe4a78f4f0b4d60f87659785595c (patch) | |
| tree | 88dde06b7be81b2de6d83f136644b5eb4885d0b5 /app/controllers/issues_controller.rb | |
| parent | 762946995ea9d477f00fea19e5040bf4dd437cb9 (diff) | |
| download | gitlab-ce-6b9f221a278ebe4a78f4f0b4d60f87659785595c.tar.gz | |
perfomance fix
Diffstat (limited to 'app/controllers/issues_controller.rb')
| -rw-r--r-- | app/controllers/issues_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 508cfc3974a..108577b9120 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -19,6 +19,8 @@ class IssuesController < ApplicationController else @project.issues.opened end + @issues = @issues.includes(:author, :project) + respond_to do |format| format.html # index.html.erb format.js @@ -35,7 +37,7 @@ class IssuesController < ApplicationController end def show - @notes = @issue.notes.order("created_at DESC").limit(20) + @notes = @issue.notes.inc_author.order("created_at DESC").limit(20) @note = @project.notes.new(:noteable => @issue) respond_to do |format| |
