-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sponsor message + add welcome, refactor later (#336)
- Loading branch information
Showing
10 changed files
with
51 additions
and
110 deletions.
There are no files selected for viewing
8 changes: 7 additions & 1 deletion
8
app/controllers/admin/coach_registrations_attendances_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
class Admin::CoachRegistrationsAttendancesController < Admin::CoachRegistrationsController | ||
|
||
|
||
def update | ||
@registration = CoachRegistration.find(params[:coach_registration_id]) | ||
@registration.update!(accepted: true, invitation_sent_at: Time.now, terms_of_service: true) | ||
event = Event.find(params[:event_id]) | ||
CoachRegistrationMailer.coach_accepted(event, @registration).deliver_now | ||
redirect_to admin_event_path(params[:event_id]) | ||
end | ||
|
||
def send_welcome_email | ||
registration = CoachRegistration.find(params[:coach_registration_id]) | ||
registration.event.welcome(:welcome_coaches, registration.coach) | ||
|
||
redirect_back(fallback_location: admin_event_path(params[:event_id])) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters