khiav223577 / pluck_all

A more efficient way to get data from database. Like #pluck method but return array of hashes instead.
MIT License
102 stars 10 forks source link

inconsistent with pluck when having `select` on relation #37

Closed khiav223577 closed 5 years ago

khiav223577 commented 5 years ago
User.where(id: 1).select(:id).pluck(:account)
# => ["vanellope"] 

User.where(id: 1).select(:id).pluck_all(:account)
# => [{"id"=>1, "account"=>"god"}] 
# But expected to be [{"account"=>"god"}]