Some ruby coolness. Try

~~~ruby
@random_likes = likes.sample
~~~

That'll return 1 random item, which is generally what you want. It won't be an array, so you may need to update that in the view. 

And, to randomly sort an array, use .shuffle