issues
search
wangxinyun1995
/
blogs
用issue记录我的博客
0
stars
0
forks
source link
Convert Array of objects to Hash with a field as the key
#9
Open
wangxinyun1995
opened
5 years ago
wangxinyun1995
commented
5 years ago
users_by_id = User.all.index_by(&:id)
users_by_id = User.all.index_by(&:id)