другие опции
response.map{ |i| [i[:id].to_s, i] }.to_h
#=> {"1"=>{:id=>1, :name=>"foo", :something=>{}}, "2"=>{:id=>2, :name=>"bar", :something=>{}}}
Hash[response.map{ |i| [i[:id].to_s, i] }]
#=> {"1"=>{:id=>1, :name=>"foo", :something=>{}}, "2"=>{:id=>2, :name=>"bar", :something=>{}}
response.inject({}) { |h, i| h[i[:id].to_s] = i; h }
#=> {"1"=>{:id=>1, :name=>"foo", :something=>{}}, "2"=>{:id=>2, :name=>"bar", :something=>{}}}
@ решение Стефана
response.each.with_object({}) { |i, h| h[i[:id].to_s] = i }
#=> {"1"=>{:id=>1, :name=>"foo", :something=>{}}, "2"=>{:id=>2, :name=>"bar", :something=>{}}}
@ решение Engineeringmnky
response.inject({}) {|h,i| h.merge({i[:id].to_s => i})}
#=> {"1"=>{:id=>1, :name=>"foo", :something=>{}}, "2"=>{:id=>2, :name=>"bar", :something=>{}}}