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