RAILS remove first element from array code example
Example 1: ruby delete first element of array
a = [0,1,2,3]
a.drop(1)
# => [1, 2, 3]
a
# => [0,1,2,3]
Example 2: rails array pop first n elements
array = [1, 2, 3, 4, 5, 6]
array.drop(2)
# => [3, 4, 5, 6]