2014-10-23 11:30:34 +08:00
|
|
|
class Activity < ActiveRecord::Base
|
|
|
|
attr_accessible :act_id, :act_type, :user_id
|
|
|
|
belongs_to :act, :polymorphic => true
|
|
|
|
belongs_to :user
|
|
|
|
validates :act_id, presence: true
|
|
|
|
validates :act_type, presence: true
|
|
|
|
validates :user_id, presence: true
|
|
|
|
end
|