You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/app/models/activity.rb

19 lines
505 B

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
include Trustie::Cache::ClearCourseEvent
before_create :set_container_type_val
#helper :activities
include ActivitiesHelper
def set_container_type_val
self.activity_container_type = get_container_type(self)
end
end