From cce0dba89aff8f0d06cac6d07ade9f1a2d2b8f21 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 30 Aug 2019 18:53:18 +0800 Subject: [PATCH] tiaoz --- app/models/course_group.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course_group.rb b/app/models/course_group.rb index c5b66d87..d158e68f 100644 --- a/app/models/course_group.rb +++ b/app/models/course_group.rb @@ -1,6 +1,6 @@ class CourseGroup < ActiveRecord::Base # attr_accessible :title, :body - belongs_to :course + belongs_to :course, counter_cache: true has_many :course_members has_many :members has_many :memberships, :class_name => 'Member'