Skip to content

Commit 3418a92

Browse files
committed
1 parent 03121e6 commit 3418a92

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

gems/actionmailer/7.0/_test/railsguides.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ def welcome_email
2727
end
2828
end
2929

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+
3036
NotifierMailer.welcome("first user").deliver_now
3137
NotifierMailer.welcome("first user").message
3238
NotifierMailer.welcome("first user").deliver_later

gems/actionmailer/7.0/_test/railsguides.rbs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ module RailsGuides
1313
class UserMailer < ApplicationMailer
1414
@user: untyped
1515
@url: String
16-
16+
1717
def welcome_email: () -> Mail::Message
1818
end
19+
20+
class I18nUserMailer < ApplicationMailer
21+
def welcome: (String email, String username) -> Mail::Message
22+
end
1923
end

gems/actionmailer/7.0/actionmailer.rbs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ module ActionMailer
2424
def params: () -> Hash[untyped, untyped]
2525

2626
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
2734
end
2835

2936
class MessageDelivery

0 commit comments

Comments
 (0)