In ruby on rails what s the difference actually. There are plenty of options available. Flatten is a array class method which returns the flattened the array and returns nil if there is no modification required syntax.