From 758ae373055b977892db3673dcd4cae58cdc98a8 Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Wed, 16 Jul 2014 22:45:58 +0800 Subject: [ci skip] Use appropriate mailer syntax. Reference: https://github.com/rails/rails/commit/f7e4362011ceb1317fd401125d48d7ccb9a1079c --- guides/source/active_record_querying.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guides/source/active_record_querying.md') 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 ``` -- cgit v1.2.3