Random trials in Ruby on Rails