Ruby 2.1 から Array#to_h というメソッドが追加になっています。 ... array = User.all; array.map(&:id).zip(array).to_h.
確定! 回上一頁