File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ def welcome_email
27
27
end
28
28
end
29
29
30
+ class I18nUserMailer < ActionMailer ::Base
31
+ def welcome ( email , username )
32
+ mail ( to : email , subject : default_i18n_subject ( user : username ) )
33
+ end
34
+ end
35
+
30
36
NotifierMailer . welcome ( "first user" ) . deliver_now
31
37
NotifierMailer . welcome ( "first user" ) . message
32
38
NotifierMailer . welcome ( "first user" ) . deliver_later
Original file line number Diff line number Diff line change @@ -13,7 +13,11 @@ module RailsGuides
13
13
class UserMailer < ApplicationMailer
14
14
@user: untyped
15
15
@url: String
16
-
16
+
17
17
def welcome_email : () -> Mail::Message
18
18
end
19
+
20
+ class I18nUserMailer < ApplicationMailer
21
+ def welcome : (String email, String username) -> Mail::Message
22
+ end
19
23
end
Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ module ActionMailer
24
24
def params : () -> Hash[untyped , untyped ]
25
25
26
26
def self?.email_address_with_name : (String, String) -> String
27
+
28
+ def headers : () -> Mail::Message
29
+ | (Hash[untyped , untyped ]) -> untyped
30
+
31
+ private
32
+
33
+ def default_i18n_subject : (?Hash[untyped , untyped ] interpolations) -> String
27
34
end
28
35
29
36
class MessageDelivery
You can’t perform that action at this time.
0 commit comments