-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from Code-the-Dream-School/HER-54-notify-users…
…-of-booking-status Her 54 notify users of booking status
- Loading branch information
Showing
6 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class BookingMailer < ApplicationMailer | ||
default from: "[email protected]" | ||
|
||
def booking_confirmation(user, booking) | ||
@user = user | ||
@booking = booking | ||
@order = @booking.order | ||
mail(to: @user.email, subject: "Booking Request Confirmation") | ||
end | ||
|
||
def new_booking_notification(speaker, booking) | ||
@speaker = speaker | ||
@booking = booking | ||
@order = @booking.order | ||
mail(to: @speaker.email, subject: "New Booking Request") | ||
end | ||
end |
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe BookingMailer, type: :mailer do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Preview all emails at http://localhost:3000/rails/mailers/booking_mailer_mailer | ||
class BookingMailerPreview < ActionMailer::Preview | ||
end |