Skip to content

Commit

Permalink
Update guides/source/active_record_querying.md
Browse files Browse the repository at this point in the history
Co-authored-by: Petrik de Heus <petrik@deheus.net>
  • Loading branch information
danielricecodes and p8 committed Sep 8, 2020
1 parent a577072 commit df0f7c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/active_record_querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ time_range = (Time.now.midnight - 1.day)..Time.now.midnight
Customer.joins(:orders).where(orders: { created_at: time_range }).distinct
```

For more advanced conditions or to reuse an existing named scope, `Relation#merge` may be used. First, let's add a new named scope to the Order model:
For more advanced conditions or to reuse an existing named scope, `Relation#merge` may be used. First, let's add a new named scope to the Order model:

```ruby
class Order < ApplicationRecord
Expand Down

0 comments on commit df0f7c8

Please sign in to comment.