Change form of table name to plural in query example

This commit is contained in:
Danila Ermakov 2016-08-22 15:22:10 +03:00
parent 9ef56e5162
commit 3b7642a328
1 changed files with 2 additions and 2 deletions

View File

@ -1014,13 +1014,13 @@ There are multiple ways to use the `joins` method.
You can just supply the raw SQL specifying the `JOIN` clause to `joins`:
```ruby
Author.joins("INNER JOIN posts ON posts.author_id = author.id AND posts.published = 't'")
Author.joins("INNER JOIN posts ON posts.author_id = authors.id AND posts.published = 't'")
```
This will result in the following SQL:
```sql
SELECT clients.* FROM clients INNER JOIN posts ON posts.author_id = author.id AND posts.published = 't'
SELECT clients.* FROM clients INNER JOIN posts ON posts.author_id = authors.id AND posts.published = 't'
```
#### Using Array/Hash of Named Associations