Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/models/invitation_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ def invite_students_to_event(event, chapter)
EventInvitationMailer.invite_student(event, student, invitation).deliver_now if invitation.save
end
end
handle_asynchronously :invite_students_to_event

def invite_coaches_to_event(event, chapter)
chapter_coaches(chapter).each do |coach|
invitation = Invitation.new(event: event, member: coach, role: 'Coach')
EventInvitationMailer.invite_coach(event, coach, invitation).deliver_now if invitation.save
end
end
handle_asynchronously :invite_coaches_to_event

def chapter_students(chapter)
Member.in_group(chapter.groups.students)
Expand Down