Hello World

Be Happy!

extract id from array and input new array with pluck


My old code
p = Program.all
p_ids = []
p.each {|m| p_ids << m.id }

Refactored code
p_ids = Program.all.pluck(:id)

#pluck (1) #rails (32)
List