You can use include? to check if an item already exists in an array:
a = [1,2,3] a.include?(3) # => true
-Jonathan.