Random Finders plugin

Plugin details

Allows quick and easy fetching of random records, or records in random order.

Simply pass the :random to the order in any finder method.

Websitehttp://daniel.collectiveidea.com/blog/2007/5/17/the-road-to-randomness Repositoryhttp://source.collectiveidea.com/public/rails/plugins/random_finders/ Author Daniel Morrison Tags random LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://source.collectiveidea.com/public/rails/plugins/random_finders/

Examples
========

Find a random article

  Article.find(:first, :order => :random)



Randomize photos

  Photo.find(:all, :order => :random)




Caveat
======
This will not treat you nicely with large datasets.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, about 1 year ago