From c63af51001cac3284502e849dab74099b3731305 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 14 Jan 2016 11:38:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8A=A8=E6=80=81=E6=95=B0?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/forge_activity.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/forge_activity.rb b/app/models/forge_activity.rb index 310d194a0..1e268784b 100644 --- a/app/models/forge_activity.rb +++ b/app/models/forge_activity.rb @@ -20,7 +20,8 @@ class ForgeActivity < ActiveRecord::Base validates :forge_act_id,presence: true validates :forge_act_type, presence: true has_many :user_acts, :class_name => 'UserAcivity',:as =>:act - after_save :add_user_activity, :add_org_activity, :add_acts_count + after_save :add_user_activity, :add_org_activity + after_create :add_acts_count before_destroy :destroy_user_activity, :destroy_org_activity, :decrease_acts_count #在个人动态里面增加当前动态