rieles .map a menos que nulo

[1, nil, 3, nil, nil].compact
=> [1, 3] 
Stormy Snail