aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_querying.md
diff options
context:
space:
mode:
authorJuanito Fatas <katehuang0320@gmail.com>2014-07-16 22:45:58 +0800
committerJuanito Fatas <katehuang0320@gmail.com>2014-07-16 22:45:58 +0800
commit758ae373055b977892db3673dcd4cae58cdc98a8 (patch)
tree6fd9c82861ee897bface4b8e625090cae7666514 /guides/source/active_record_querying.md
parent04e1281990fd1d18d95c6b609690380711d0b48a (diff)
downloadrails-758ae373055b977892db3673dcd4cae58cdc98a8.tar.gz
rails-758ae373055b977892db3673dcd4cae58cdc98a8.tar.bz2
rails-758ae373055b977892db3673dcd4cae58cdc98a8.zip
[ci skip] Use appropriate mailer syntax.
Reference: https://github.com/rails/rails/commit/f7e4362011ceb1317fd401125d48d7ccb9a1079c
Diffstat (limited to 'guides/source/active_record_querying.md')
-rw-r--r--guides/source/active_record_querying.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index c9e265de08..a0a2f31a63 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -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
```