app/models/assignment_team.rb
# Use current object (AssignmentTeam) as reviewee and create the ReviewResponseMap record
Use current object (AssignmentTeam) as reviewee and create the ReviewResponseMap record
Use current object ( AssignmentTeam ) as reviewee and create the ReviewResponseMap record
def assign_reviewer(reviewer)
    assignment = Assignment.find(self.parent_id)
    raise "The assignment cannot be found." if assignment.nil?
    ReviewResponseMap.create(reviewee_id: self.id, reviewer_id: reviewer.id,
                             reviewed_object_id: assignment.id)
  end
def assign_reviewer ( reviewer ) assignment = Assignment . find ( self . parent_id ) raise "The assignment cannot be found." if assignment . nil? ReviewResponseMap . create ( reviewee_id : self . id , reviewer_id : reviewer . id , reviewed_object_id : assignment . id ) end
Use current object (AssignmentTeam) as reviewee and create the ReviewResponseMap record
Use current object ( AssignmentTeam ) as reviewee and create the ReviewResponseMap record
reviewer