Open
Description
Hello!
I needed to get array of only one column values from my locations table and it seems that pluck() always returns location.id, not depending what attribute is passed to the function.
Location.near('Lille')
=>
Location id: 4, area: "Lille", lat: 50.6292, lon: 3.05726, created_at: "2012-01-25 18:13:09",
Location id: 6, area: "Villeneuve-d'Ascq", lat: 50.6233, lon: 3.145, created_at: "2012-01-25 19:05:44"Location.near('Lille').pluck(:id)
=> [4, 6]Location.near('Lille').pluck(:created_at)
=> [4, 6]
Regards,
Santuxus