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 #在个人动态里面增加当前动态