Skip to content

Commit

Permalink
change prepopulated TO field for form submission email
Browse files Browse the repository at this point in the history
  • Loading branch information
ArushC committed Feb 21, 2024
1 parent 2088b07 commit 7a8e473
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/mailers/teacher_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ def request_info_email(teacher, request_reason)
def form_submission(teacher)
@teacher = teacher
set_body
set_recipients
if @teacher.not_reviewed?
mail to: CONTACT_EMAIL,
mail to: @recipients,
subject: email_template.subject
end
end
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_02_18_005604) do
ActiveRecord::Schema.define(version: 2024_02_20_192015) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down
10 changes: 5 additions & 5 deletions db/seed_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ module SeedData
DENY_EMAIL3

@to_field = "{{teacher_email}}, {{teacher_personal_email}}"
@default_to_field = "{{teacher_email}}, {{teacher_personal_email}}"

def self.emails
[
{
to: @to_field,
to: @default_to_field,
body: @welcome_email,
path: "teacher_mailer/welcome_email",
locale: nil,
Expand All @@ -76,7 +76,7 @@ def self.emails
subject: "Welcome to The Beauty and Joy of Computing!"
},
{
to: @to_field,
to: "[email protected], [email protected]",
body: @form_submission,
path: "teacher_mailer/form_submission",
locale: nil,
Expand All @@ -88,7 +88,7 @@ def self.emails
subject: "Form Submission"
},
{
to: @to_field,
to: @default_to_field,
body: @deny_email,
path: "teacher_mailer/deny_email",
locale: nil,
Expand All @@ -100,7 +100,7 @@ def self.emails
subject: "Deny Email"
},
{
to: @to_field,
to: @default_to_field,
body: @basic_email_with_reason,
path: "teacher_mailer/request_info_email",
locale: nil,
Expand Down

0 comments on commit 7a8e473

Please sign in to comment.