aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
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