Class: ForemanPatch::GroupMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- ForemanPatch::GroupMailer
- Defined in:
- app/mailers/foreman_patch/group_mailer.rb
Instance Method Summary collapse
Instance Method Details
#completed(options) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/mailers/foreman_patch/group_mailer.rb', line 15 def completed() user = [:user] @group = [:group].name @total = [:group].invocations.count @successes = [:group].invocations.successful.pluck(:name) @warnings = [:group].invocations.warning.pluck(:name) @failures = [:group].invocations.failed.pluck(:name) set_locale_for(user) do mail(to: user.mail, subject: (_("%s Patching Completed") % @group)) end end |
#initiated(options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/mailers/foreman_patch/group_mailer.rb', line 4 def initiated() user = [:user] @group = [:group].name @hosts = [:group].invocations.pluck(:name) set_locale_for(user) do mail(to: user.mail, subject: (_("%s Patching Initiated") % @group)) end end |
#report(options) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'app/mailers/foreman_patch/group_mailer.rb', line 29 def report() user = [:user] @group = [:group].name @result = [:result] set_locale_for(user) do mail(to: user.mail, subject: (_("%s Preliminary Report") % @group)) end end |