Skip to content

Commit

Permalink
Demonstrate appropriate ActionMailer API
Browse files Browse the repository at this point in the history
  • Loading branch information
julik committed Jun 11, 2024
1 parent 0be2994 commit e2b3997
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ batches of jobs. It is supplemented by a module which will make all `perform_lat
```ruby
Gouda.in_bulk do
User.joined_recently.find_each do |user|
WelcomeMailer.deliver_later(user)
WelcomeMailer.with(user:).welcome_email.deliver_later
end
end
```
Expand All @@ -96,7 +96,7 @@ once the data it needs to operate on is already available for reading. This is g
```ruby
User.transaction do
freshly_joined_user = User.create!(user_params)
WelcomeMailer.deliver_later(freshly_joined_user)
WelcomeMailer.with(user: freshly_joined_user).welcome_email.deliver_later
end
```

Expand Down

0 comments on commit e2b3997

Please sign in to comment.