Class: EgovUtils::RegistrationRequestMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/egov_utils/registration_request_mailer.rb

Constant Summary collapse

DEFAULT_MAIL =
'vts@msp.justice.cz'

Instance Method Summary collapse

Instance Method Details

#accepted(request_id, user_id, password) ⇒ Object



12
13
14
15
16
17
18
# File 'app/mailers/egov_utils/registration_request_mailer.rb', line 12

def accepted(request_id, user_id, password)
  @request = EgovUtils::RegistrationRequest.find(request_id)
  @user = User.find(user_id)
  @password = password

  mail(to: @user.mail, subject: I18n.t('mailers.registration_requests.accepted.subject'))
end

#auto_accepted(request_id) ⇒ Object



20
21
22
23
24
# File 'app/mailers/egov_utils/registration_request_mailer.rb', line 20

def auto_accepted(request_id)
  @request = EgovUtils::RegistrationRequest.find(request_id)

  mail(to: @request.mail, subject: I18n.t('mailers.registration_requests.auto_accepted.subject'))
end

#created(request_id) ⇒ Object



6
7
8
9
10
# File 'app/mailers/egov_utils/registration_request_mailer.rb', line 6

def created(request_id)
  @request = EgovUtils::RegistrationRequest.find(request_id)

  mail(to: @request.mail, cc: DEFAULT_MAIL, subject: I18n.t('mailers.registration_requests.created.subject'))
end

#rejected(request_id) ⇒ Object



26
27
28
29
30
# File 'app/mailers/egov_utils/registration_request_mailer.rb', line 26

def rejected(request_id)
  @request = EgovUtils::RegistrationRequest.find(request_id)

  mail(to: @request.mail, subject: I18n.t('mailers.registration_requests.rejected.subject'))
end