[Solved] Select elements in array rails [closed]


Array#[] accepts a Range instance, and the right boundary can be negative, specifying the amount of elements from the end:

x[1..-1]

solved Select elements in array rails [closed]