Skip to content

Commit 3cc5c8d

Browse files
committed
Update README
1 parent c41886a commit 3cc5c8d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ Organize emails with plain 'ol Ruby objects in a Rails application, like this:
55
```ruby
66
# ./app/email/user/welcome.rb
77
class User::WelcomeEmail < ApplicationEmail
8-
def initialize(person:)
9-
@person = person
8+
def initialize(user:)
9+
@user = user
1010
end
1111

12-
def to = @person.email
12+
def to = @user.email
1313
def subject = "Welcome to Beautiful Ruby"
1414
def body
1515
super do
1616
<<~_
17-
Hi #{@person.name},
17+
Hi #{@user.name},
1818
1919
You're going to learn a ton at https://beautifulruby.com.
2020
_
@@ -88,16 +88,16 @@ You can customize the email by overriding the `to`, `from`, `subject`, and `body
8888
```ruby
8989
# ./app/email/user/welcome.rb
9090
class User::WelcomeEmail < ApplicationEmail
91-
def initialize(person:)
92-
@person = person
91+
def initialize(user:)
92+
@user = user
9393
end
9494

95-
def to = @person.email
95+
def to = @user.email
9696
def subject = "Welcome to the website"
9797
def body
9898
super do
9999
<<~_
100-
Hi #{@person.name},
100+
Hi #{@user.name},
101101
102102
Welcome to the website We're excited to have you on board.
103103
_

0 commit comments

Comments
 (0)