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)

#rails (34) #pluck (1)
List