aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-02-20 22:27:22 +0900
committerGitHub <noreply@github.com>2019-02-20 22:27:22 +0900
commitceed0aa2e0e45523496130e5a5c4a4f032e8cd2a (patch)
tree09b1dfbb51826921f83ffbeede9ddfbd295af267 /guides
parentdf2ebf9b59b8ef063923136ba7097328db6c949f (diff)
parent11c34d8ef44b95b3989cb8376af09842293c892c (diff)
downloadrails-ceed0aa2e0e45523496130e5a5c4a4f032e8cd2a.tar.gz
rails-ceed0aa2e0e45523496130e5a5c4a4f032e8cd2a.tar.bz2
rails-ceed0aa2e0e45523496130e5a5c4a4f032e8cd2a.zip
Merge pull request #35327 from abhaynikam/use-delete-by-and-destroy-by-method
Replaced usage of where.delete/destroy_all with delete/destroy_by
Diffstat (limited to 'guides')
-rw-r--r--guides/source/active_record_basics.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md
index 4cf4111bf0..271d94c597 100644
--- a/guides/source/active_record_basics.md
+++ b/guides/source/active_record_basics.md
@@ -314,7 +314,7 @@ method:
```ruby
# find and delete all users named David
-User.where(name: 'David').destroy_all
+User.destroy_by(name: 'David')
# delete all users
User.destroy_all