Skip to content

Commit aa19ba4

Browse files
author
David Zuckerman
committed
added struct file for affiliate borrow request
1 parent 1fa4072 commit aa19ba4

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

app/mailers/borrow_request.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
BorrowRequest = Struct.new(
2+
:department_head_email,
3+
:department_head_name,
4+
:department_name,
5+
:employee_email,
6+
:employee_id,
7+
:employee_name,
8+
:employee_personal_email,
9+
:employee_phone,
10+
:employee_preferred_name,
11+
:employee_address,
12+
keyword_init: true
13+
)

app/mailers/request_mailer.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ class RequestMailer < ApplicationMailer
77
helper :mail
88

99
# Sends the AffiliateBorrowRequestForm
10-
def affiliate_borrow_request_form_email(borrow_request)
11-
@borrow_request = Struct.new(borrow_request)
10+
def affiliate_borrow_request_form_email(borrow_request_hash)
11+
@borrow_request = BorrowRequest.new(**borrow_request_hash)
1212

13-
mail(to: borrow_request.department_head_email)
13+
mail(to: @borrow_request.department_head_email)
1414
end
1515

1616
# Send LibstaffEdevicesLoanRequest confirmation email to user

0 commit comments

Comments
 (0)