Open kakas opened 6 years ago
以目前 deep_pluck
的設計
users.deep_pluck(preferences: [:food, :car])
預期的輸出格式會是:
[
{preferences: [{food: xx, car: xx}, {food: xx, car: xx}, ......]}, # user1
{preferences: [{food: xx, car: xx}, {food: xx, car: xx}, ......]}, # user2
...
...
]
跟你想要的不太一樣
可能要再想想語法格式的問題
可否支援 deep_pluck 出 model 裡面序列化的欄位?