trustieforge/app/models/user_activity.rb

8 lines
280 B
Ruby

class UserActivity < ActiveRecord::Base
attr_accessible :act_type,:act_id,:container_type,:container_id
# 虚拟关联---项目动态表/课程动态表
belongs_to :act ,:polymorphic => true
# 虚拟关联---项目/课程
belongs_to :container ,:polymorphic => true
end