perfomance fix
This commit is contained in:
parent
762946995e
commit
6b9f221a27
3 changed files with 16 additions and 4 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue