webdev.camp/app/mailers/apply_mailer.rb

25 lines
683 B
Ruby

class ApplyMailer < ApplicationMailer
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.apply.submit.subject
#
def submit( application )
@application = application
email = @application.user.email
mail(to: email, reply_to: email , subject: "Your application has been submitted")
end
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.apply.cancel.subject
#
def cancel( application , reason)
@application = application
@reason = reason
mail(to: @application.user.email, subject: "Your application has been cancelled")
end
end