2013-08-11 10:36:55 +08:00
|
|
|
class Activity < ActiveRecord::Base
|
|
|
|
attr_accessible :act_id, :act_type, :user_id
|
|
|
|
belongs_to :act, :polymorphic => true
|
2013-08-12 15:37:42 +08:00
|
|
|
belongs_to :user
|
2014-10-15 11:08:41 +08:00
|
|
|
validates :act_id, presence: true
|
|
|
|
validates :act_type, presence: true
|
|
|
|
validates :user_id, presence: true
|
2013-08-11 10:36:55 +08:00
|
|
|
end
|