CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 20 Aug 2025 11:09:53 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090616120735
location: https://web.archive.org/web/20090616120735/https://github.com/hgimenez/fast_random
server-timing: captures_list;dur=1.179634, exclusion.robots;dur=0.036508, exclusion.robots.policy;dur=0.016691, esindex;dur=0.019031, cdx.remote;dur=45.350751, LoadShardBlock;dur=666.965710, PetaboxLoader3.resolve;dur=502.811929, PetaboxLoader3.datanode;dur=93.449222
x-app-server: wwwb-app218
x-ts: 302
x-tr: 846
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=12
set-cookie: wb-p-SERVER=wwwb-app218; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 301
server: nginx
date: Wed, 20 Aug 2025 11:09:53 GMT
content-type: text/html; charset=utf-8
content-length: 116
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Tue, 16 Jun 2009 12:07:35 GMT
x-archive-orig-connection: close
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090616120735/https://github.com/hgimenez/fast_random/tree/master
x-archive-orig-x-runtime: 119ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 116
cache-control: max-age=1800
memento-datetime: Tue, 16 Jun 2009 12:07:35 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 16 Jun 2009 12:07:35 GMT", ; rel="memento"; datetime="Tue, 16 Jun 2009 12:07:35 GMT", ; rel="next memento"; datetime="Mon, 18 Jun 2012 11:30:50 GMT", ; rel="last memento"; datetime="Tue, 14 Mar 2017 15:03:51 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_10_20090616115045_crawl101_IndexOnly-c/52_10_20090616120718_crawl101.arc.gz
server-timing: captures_list;dur=0.737822, exclusion.robots;dur=0.023663, exclusion.robots.policy;dur=0.011960, esindex;dur=0.014821, cdx.remote;dur=13.074290, LoadShardBlock;dur=232.822521, PetaboxLoader3.datanode;dur=185.553100, PetaboxLoader3.resolve;dur=142.197665, load_resource;dur=138.503173
x-app-server: wwwb-app218
x-ts: 301
x-tr: 409
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 302
server: nginx
date: Wed, 20 Aug 2025 11:09:54 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090616053710
location: https://web.archive.org/web/20090616053710/https://github.com/hgimenez/fast_random/tree/master
server-timing: captures_list;dur=2.521038, exclusion.robots;dur=0.022760, exclusion.robots.policy;dur=0.010652, esindex;dur=0.013744, cdx.remote;dur=16.646836, LoadShardBlock;dur=208.862646, PetaboxLoader3.datanode;dur=126.544056, PetaboxLoader3.resolve;dur=80.698643
x-app-server: wwwb-app218
x-ts: 302
x-tr: 252
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Wed, 20 Aug 2025 11:09:55 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Tue, 16 Jun 2009 05:37:09 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 228ms
x-archive-orig-etag: "f57ba101bed44187e3a678ef8c2571c6"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 20560
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Tue, 16 Jun 2009 05:37:10 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 15 Jun 2009 05:05:46 GMT", ; rel="prev memento"; datetime="Mon, 15 Jun 2009 05:05:46 GMT", ; rel="memento"; datetime="Tue, 16 Jun 2009 05:37:10 GMT", ; rel="next memento"; datetime="Sat, 15 Aug 2009 05:38:04 GMT", ; rel="last memento"; datetime="Sat, 15 Aug 2009 05:38:04 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_10_20090616025946_crawl100-c/52_10_20090616053605_crawl101.arc.gz
server-timing: captures_list;dur=0.456883, exclusion.robots;dur=0.016155, exclusion.robots.policy;dur=0.007220, esindex;dur=0.009555, cdx.remote;dur=24.626829, LoadShardBlock;dur=371.673279, PetaboxLoader3.resolve;dur=281.839537, PetaboxLoader3.datanode;dur=266.783990, load_resource;dur=208.384622
x-app-server: wwwb-app218
x-ts: 200
x-tr: 655
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
hgimenez's fast_random at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Description: | Find a random record with ActiveRecord |
Clone URL: |
git://github.com/hgimenez/fast_random.git
Give this clone URL to anyone.
git clone git://github.com/hgimenez/fast_random.git
|

Harold A. Giménez (author)
Fri May 22 07:14:29 -0700 2009
name | age | message | |
---|---|---|---|
![]() |
MIT-LICENSE | Fri May 22 07:14:29 -0700 2009 | first commit of plugin files [Harold A. Giménez] |
![]() |
README | Fri May 22 07:14:29 -0700 2009 | first commit of plugin files [Harold A. Giménez] |
![]() |
Rakefile | Loading commit data... ![]() |
|
![]() |
init.rb | Fri May 22 07:14:29 -0700 2009 | first commit of plugin files [Harold A. Giménez] |
![]() |
install.rb | ||
![]() |
lib/ | Fri May 22 07:14:29 -0700 2009 | first commit of plugin files [Harold A. Giménez] |
![]() |
tasks/ | Fri May 22 07:14:29 -0700 2009 | first commit of plugin files [Harold A. Giménez] |
![]() |
test/ | ||
![]() |
uninstall.rb | Fri May 22 07:14:29 -0700 2009 | first commit of plugin files [Harold A. Giménez] |
fast_random ========== This plugin extends active record by adding a class level random method which returns a random record from the database. The approach taken performs better than 'order by rand() limit 1' for large datasets. It uses offset instead of an order by to retrieve the random record in a database agnostic way. Example ======= class Foo < ActiveRecord::Base; end Foo.random Copyright (c) 2009 Harold A. Gimenez, released under the MIT license
This feature is coming soon. Sit tight!