Update documentation for #pluck method [ci skip]

This commit is contained in:
Jędrek Domański 2018-07-14 14:11:30 +02:00
parent bd5eba1adf
commit 1e2650acbb

@ -1777,6 +1777,12 @@ Client.pluck(:name)
# => ["David", "Jeremy", "Jose"]
```
You are not limited to querying fields from a single table, you can query multiple tables as well.
```
Client.joins(:comments, :categories).pluck("clients.email, comments.title, categories.name")
```
Furthermore, unlike `select` and other `Relation` scopes, `pluck` triggers an immediate
query, and thus cannot be chained with any further scopes, although it can work with
scopes already constructed earlier: