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 a227b54040..f4baf92228 100644
--- a/guides/source/active_record_basics.md
+++ b/guides/source/active_record_basics.md
@@ -260,7 +260,7 @@ david = User.find_by(name: 'David')
```ruby
# find all users named David who are Code Artists and sort by created_at in reverse chronological order
-users = User.where(name: 'David', occupation: 'Code Artist').order('created_at DESC')
+users = User.where(name: 'David', occupation: 'Code Artist').order(created_at: :desc)
```
You can learn more about querying an Active Record model in the [Active Record