提交 758ae373 编写于 作者: J Juanito Fatas

[ci skip] Use appropriate mailer syntax.

Reference: https://github.com/rails/rails/commit/f7e4362011ceb1317fd401125d48d7ccb9a1079c
上级 04e12819
......@@ -293,7 +293,7 @@ This may appear straightforward:
```ruby
# This is very inefficient when the users table has thousands of rows.
User.all.each do |user|
NewsLetter.weekly_deliver(user)
NewsMailer.weekly(user).deliver
end
```
......@@ -333,7 +333,7 @@ The `:batch_size` option allows you to specify the number of records to be retri
```ruby
User.find_each(batch_size: 5000) do |user|
NewsLetter.weekly_deliver(user)
NewsMailer.weekly(user).deliver
end
```
......@@ -345,7 +345,7 @@ For example, to send newsletters only to users with the primary key starting fro
```ruby
User.find_each(start: 2000, batch_size: 5000) do |user|
NewsLetter.weekly_deliver(user)
NewsMailer.weekly(user).deliver
end
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册