Arrays in Ruby don’t have exists? method, but they have an include? method as described in the docs.
Something like
unless @suggested_horses.include?(horse)
@suggested_horses << horse
end
should work out of box.
Arrays in Ruby don’t have exists? method, but they have an include? method as described in the docs.
Something like
unless @suggested_horses.include?(horse)
@suggested_horses << horse
end
should work out of box.