PaymentMethod.all.each_with_index do |payment, n = 0|
payment.update_column(:enc_number, @enc[n])
n +=1
end
6
solved Ruby/Rails update model attribute with array items? [closed]
PaymentMethod.all.each_with_index do |payment, n = 0|
payment.update_column(:enc_number, @enc[n])
n +=1
end
6
solved Ruby/Rails update model attribute with array items? [closed]