Fix SQL result of `Book.joins(reviews: :customer)` query example

This commit is contained in:
Alexandre Barret 2021-03-24 09:09:11 +13:00
parent ad9e52066c
commit 7a0cb3d239
1 changed files with 2 additions and 2 deletions

View File

@ -1254,8 +1254,8 @@ This produces:
```sql
SELECT books.* FROM books
INNER JOIN reviews ON reviews.book_id = book.id
INNER JOIN customer ON customers.id = reviews.id
INNER JOIN reviews ON reviews.book_id = books.id
INNER JOIN customers ON customers.id = reviews.customer_id
```
Or, in English: "return all books that have a review by a customer."