The Beauty of Ruby #32498 3

Posted by Matt on November 09, 2008

Ever want to find a random ActiveRecord object? Seems simple, but there isn’t really an easy way to do it (well, a really easy way). This little snippet really shows the elegance of Ruby and I thought I’d share: