Joined September 2012
·

Erick Vanegas

Kakao Media
·
Nicaragua
·
·
·

Posted to Rails Quick Tips - Random Records over 1 year ago

I will add another approach:
Take a random number within the Object length, and get some like 20 records (In Active Record), then suffle it and take 5 (in Ruby not Active Record). It could be better in high database, but maybe not random enough.

Posted to Rails Quick Tips - Random Records over 1 year ago

@natebird Why did you say that 'randumb' scales better?
In the repository the author says that he already uses the rand function, and he says that his gem could have the same problem with high databases.

Thanks, I will try it.

Posted to CSS3 blur text over 1 year ago

@flurin Cool <

Achievements
89 Karma
1,792 Total ProTip Views
Interests & Skills