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 argument and returns an array of values of the specified columns with the corresponding data type. Client.where(active: true).pluck(:id)# SELECT id FROM clients WHERE active = 1# => [1, 2, 3] Client.distinct.pluck(:role)# SELECT DISTINCT role FROM clients# => ['admin', ..