Skip to content

Commit

Permalink
Changed ActiveRecord::Relation#pluck guide to be more similar to th…
Browse files Browse the repository at this point in the history
…e API docs for better clarity [skip ci]
  • Loading branch information
soartec-lab committed Jun 14, 2023
1 parent 0fbe3b9 commit d1a1f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/active_record_querying.md
Expand Up @@ -2167,7 +2167,7 @@ irb> Customer.connection.select_all("SELECT first_name, created_at FROM customer

### `pluck`

[`pluck`][] can be used to query single or multiple columns from the underlying table of a model. It accepts a list of column names as an argument and returns an array of values of the specified columns with the corresponding data type.
[`pluck`][] can be used to pick the value(s) from the named column(s) in the current relation. It accepts a list of column names as an argument and returns an array of values of the specified columns with the corresponding data type.

```irb
irb> Book.where(out_of_print: true).pluck(:id)
Expand Down

0 comments on commit d1a1f54

Please sign in to comment.