app/models/assignment_team.rb
# Add Participants to the current Assignment Team
Add Participants to the current Assignment Team
Add Participants to the current Assignment Team
def add_participant(assignment_id, user)
    if AssignmentParticipant.find_by(parent_id: assignment_id, user_id: user.id).nil?
      AssignmentParticipant.create(parent_id: assignment_id, user_id: user.id, permission_granted: user.master_permission_granted)
    end
  end
def add_participant ( assignment_id , user ) if AssignmentParticipant . find_by ( parent_id : assignment_id , user_id : user . id ) . nil? AssignmentParticipant . create ( parent_id : assignment_id , user_id : user . id , permission_granted : user . master_permission_granted ) end end
Add Participants to the current Assignment Team
Add Participants to the current Assignment Team
assignment_id
user