项目动态数更新
This commit is contained in:
parent
27617044a1
commit
c63af51001
|
@ -20,7 +20,8 @@ class ForgeActivity < ActiveRecord::Base
|
||||||
validates :forge_act_id,presence: true
|
validates :forge_act_id,presence: true
|
||||||
validates :forge_act_type, presence: true
|
validates :forge_act_type, presence: true
|
||||||
has_many :user_acts, :class_name => 'UserAcivity',:as =>:act
|
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
|
before_destroy :destroy_user_activity, :destroy_org_activity, :decrease_acts_count
|
||||||
|
|
||||||
#在个人动态里面增加当前动态
|
#在个人动态里面增加当前动态
|
||||||
|
|
Loading…
Reference in New Issue