I just found this handy helper:
list.reject(&:nil?) == list.compact
It removes any nil elements from a given array see: docs
I just found this handy helper:
list.reject(&:nil?) == list.compact
It removes any nil elements from a given array see: docs