app/mailers/user_mailer.rb
#email the user who took the sub and the requester of the sub that their shift has been taken
email the user who took the sub and the requester of the sub that their shift has been taken
email the user who took the sub and the requester of the sub that their shift has been taken
def sub_taken_notification(owner, new_shift, dept)
    @owner = owner
    @new_shift = new_shift
    mail(to: @owner.email, 
         from: dept.department_config.mailer_address, 
         cc: new_shift.user.email,
         subject: "[Sub Request] #{new_shift.user.name} took your sub!", 
         date: Time.now)
  end
def sub_taken_notification ( owner , new_shift , dept ) @owner = owner @new_shift = new_shift mail ( to : @owner . email , from : dept . department_config . mailer_address , cc : new_shift . user . email , subject : "[Sub Request] #{new_shift.user.name} took your sub!" , date : Time . now ) end
email the user who took the sub and the requester of the sub that their shift has been taken
email the user who took the sub and the requester of the sub that their shift has been taken
owner
new_shift
dept