module Enumerable
Add pluck to enumerable… its already done for us in rails 5+
Public Instance Methods
pluck(key)
click to toggle source
# File lib/enumerable/pluck.rb, line 3 def pluck(key) map { |element| element[key] } end