diff --git a/app/models/invitation_manager.rb b/app/models/invitation_manager.rb index f65031273..7e300739f 100644 --- a/app/models/invitation_manager.rb +++ b/app/models/invitation_manager.rb @@ -33,6 +33,7 @@ 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| @@ -40,6 +41,7 @@ def invite_coaches_to_event(event, chapter) 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)