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.
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