app/mailers/user_mailer.rb
def stale_shift(user, stale_shift, dept)
    @user = user
    @stale_shift = stale_shift
    mail(to: "#{user.name} <#{user.email}>", from: dept.department_config.mailer_address,
      subject: "Your Shift in the #{stale_shift.location.name} has been inactive for at least an hour.", date: Time.now)
  end
#an email is sent to a student if they have been inactive in their shift for an hour
an email is sent to a student if they have been inactive in their shift for an hour
an email is sent to a student if they have been inactive in their shift for an hour
def stale_shift(user, stale_shift, dept)
    @user = user
    @stale_shift = stale_shift
    mail(to: "#{user.name} <#{user.email}>", from: dept.department_config.mailer_address,
      subject: "Your Shift in the #{stale_shift.location.name} has been inactive for at least an hour.", date: Time.now)
  end
def stale_shift ( user , stale_shift , dept ) @user = user @stale_shift = stale_shift mail ( to : "#{user.name} <#{user.email}>" , from : dept . department_config . mailer_address , subject : "Your Shift in the #{stale_shift.location.name} has been inactive for at least an hour." , date : Time . now ) end
an email is sent to a student if they have been inactive in their shift for an hour
an email is sent to a student if they have been inactive in their shift for an hour
user
stale_shift
dept