1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

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."