Last Updated: February 25, 2016
·
607
· ariejan

Short-syntax for Array#map

Instead of doing

@emails = @users.map { |i| i.email }

You can do

@emails = @users.map(&:email)