def random_sort(set)
      set.order do
        # this is a bit of a hack obviously, but it checks the sort of
        # data engine being used to figure out how to randomly sort
        if set.class.name !~ /mysql/i
          random.function
        else
          rand.function
        end
      end
    end
def random_sort(set)
      set.order do
        # this is a bit of a hack obviously, but it checks the sort of
        # data engine being used to figure out how to randomly sort
        if set.class.name !~ /mysql/i
          random.function
        else
          rand.function
        end
      end
    end
randomly sort a result set according to the data adapter class