class RelationMember < ActiveRecord::Base
set_table_name 'current_relation_members'
+ set_primary_keys :id, :sequence_id
belongs_to :member, :polymorphic => true, :foreign_type => :member_class
belongs_to :relation, :foreign_key => :id
end
def after_initialize
- self[:member_class] = self.member_type.capitalize
+ self[:member_class] = self.member_type.capitalize unless self.member_type.nil?
end
def before_save