rails/rails — Issue #4776: Make the pluck method accept an arbitrary number of params
Author: gnagno
Created: 2012-01-31 05:58:26+00:00
State: open

Hello all,

I just discovered the new pluck method, I think it could be usefull to add an overloaded version of this method that will accept an arbitrary number of fields, so one can make Model.pluck(:field1, :field2, ...).

I know this would break consistency because the actual version returns an array of strings and this overloaded version would return an array of arrays, but I still think this would be very usefull.

While I am here maybe it would be nice to modify even the select method, I know one can do Model.select(:field1).select(:field2) but I think Model.select(:field1, :field2) would be easier

Thanks
Gnagno