bigdir/app/models/activity.rb

8 lines
200 B
Ruby

class Activity < ActiveRecord::Base
attr_accessible :act_id, :act_type, :user_id
belongs_to :act, :polymorphic => true
belongs_to :user
validates_presence_of :act_id, :act_type, :user_id
end