RubyFlow The Ruby and Rails community linklog

A better Array#rand

This plugin overrides the Array#rand method that Rails gives you to support not only getting a single random element of the array back, but also a random subset of elements (as an array) from the source array.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in