From ce4f49b635a33aca60e5d85d2c01db51b574f157 Mon Sep 17 00:00:00 2001 From: yanxd Date: Tue, 25 Mar 2014 09:27:43 +0800 Subject: [PATCH] counter cache for issue --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 1ea358a37..d28fe6edc 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -19,7 +19,7 @@ class Issue < ActiveRecord::Base include Redmine::SafeAttributes include Redmine::Utils::DateCalculation - belongs_to :project + belongs_to :project, :counter_cache => true belongs_to :tracker belongs_to :status, :class_name => 'IssueStatus', :foreign_key => 'status_id' belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'