CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 22 Aug 2025 02:39:00 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090106132643
location: https://web.archive.org/web/20090106132643/https://github.com/ryanb/scope-builder/tree
server-timing: captures_list;dur=0.714690, exclusion.robots;dur=0.031508, exclusion.robots.policy;dur=0.019000, esindex;dur=0.009992, cdx.remote;dur=47.831099, LoadShardBlock;dur=404.812948, PetaboxLoader3.datanode;dur=120.418075, PetaboxLoader3.resolve;dur=144.305550
x-app-server: wwwb-app202
x-ts: 302
x-tr: 482
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app202; 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: Fri, 22 Aug 2025 02:39:01 GMT
content-type: text/html; charset=utf-8
content-length: 115
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Tue, 06 Jan 2009 13:26:41 GMT
x-archive-orig-connection: close
x-archive-orig-set-cookie: _github_ses=BAh7ByIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7ADoOcmV0dXJuX3RvIhUvcnlhbmIvZm9sbG93ZXJz--c7c6c55777479b7ce426a41666da8d9c166ed5fd; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090106132643/https://github.com/ryanb/scope-builder/tree/master
x-archive-orig-x-runtime: 757ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 115
cache-control: max-age=1800
memento-datetime: Tue, 06 Jan 2009 13:26:43 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 01 Jul 2008 00:03:09 GMT", ; rel="prev memento"; datetime="Thu, 25 Sep 2008 09:07:09 GMT", ; rel="memento"; datetime="Tue, 06 Jan 2009 13:26:43 GMT", ; rel="next memento"; datetime="Sat, 14 Feb 2009 11:58:46 GMT", ; rel="last memento"; datetime="Sat, 16 May 2009 18:39:52 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_7_20090106120025_crawl103-c/52_7_20090106132410_crawl103.arc.gz
server-timing: captures_list;dur=0.492931, exclusion.robots;dur=0.020694, exclusion.robots.policy;dur=0.013101, esindex;dur=0.008458, cdx.remote;dur=4.874540, LoadShardBlock;dur=189.039202, PetaboxLoader3.datanode;dur=110.267698, PetaboxLoader3.resolve;dur=414.071304, load_resource;dur=402.346602
x-app-server: wwwb-app202
x-ts: 301
x-tr: 620
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
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: Fri, 22 Aug 2025 02:39:01 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Tue, 06 Jan 2009 13:26:42 GMT
x-archive-orig-connection: close
x-archive-orig-set-cookie: _github_ses=BAh7BzoOcmV0dXJuX3RvIhUvcnlhbmIvZm9sbG93ZXJzIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--5652b872f01fb6658578fd08083cedaf38806649; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 990ms
x-archive-orig-etag: "8ce33c49b7b1b2d4d6d67fc547f23c1a"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 18589
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Tue, 06 Jan 2009 13:26:43 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 30 Jun 2008 09:37:38 GMT", ; rel="prev memento"; datetime="Tue, 16 Dec 2008 01:49:33 GMT", ; rel="memento"; datetime="Tue, 06 Jan 2009 13:26:43 GMT", ; rel="next memento"; datetime="Fri, 06 Feb 2009 14:32:02 GMT", ; rel="last memento"; datetime="Fri, 24 Jan 2020 11:06:55 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_7_20090106120025_crawl103-c/52_7_20090106132410_crawl103.arc.gz
server-timing: captures_list;dur=0.496916, exclusion.robots;dur=0.019622, exclusion.robots.policy;dur=0.011827, esindex;dur=0.008967, cdx.remote;dur=15.633198, LoadShardBlock;dur=93.872373, PetaboxLoader3.datanode;dur=156.899786, load_resource;dur=190.731773, PetaboxLoader3.resolve;dur=123.292826
x-app-server: wwwb-app202
x-ts: 200
x-tr: 363
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
ryanb's scope-builder at master — GitHub
We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]
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 (

Run the following if you haven't already:
gem sources -a https://gems.github.com
Install the gem(s):
sudo gem install ryanb-scope-builder
Description: | Build up named scopes conditionally. |
Clone URL: |
git://github.com/ryanb/scope-builder.git
Give this clone URL to anyone.
git clone git://github.com/ryanb/scope-builder.git
|
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Thu Jun 26 09:27:18 -0700 2008 | rewriting builder to act as a simple delegator [ryanb] |
![]() |
CHANGELOG | Thu Aug 28 07:10:35 -0700 2008 | releasing v0.1.2 [ryanb] |
![]() |
LICENSE | Thu Jun 26 07:38:34 -0700 2008 | initial import [ryanb] |
![]() |
Manifest | Thu Aug 28 07:10:35 -0700 2008 | releasing v0.1.2 [ryanb] |
![]() |
README | Thu Jun 26 11:13:19 -0700 2008 | bumping version to 0.1.1 [ryanb] |
![]() |
Rakefile | Thu Aug 28 07:10:35 -0700 2008 | releasing v0.1.2 [ryanb] |
![]() |
lib/ | Thu Aug 28 07:07:08 -0700 2008 | merging scope additions into model additions si... [ryanb] |
![]() |
scope-builder.gemspec | Thu Aug 28 07:10:35 -0700 2008 | releasing v0.1.2 [ryanb] |
![]() |
script/ | Thu Jun 26 09:41:41 -0700 2008 | fixing script/console so it properly loads the ... [ryanb] |
![]() |
spec/ | Thu Aug 28 07:04:59 -0700 2008 | scope_builder can now be called on association ... [ryanb] |
![]() |
tasks/ | Thu Jun 26 07:38:34 -0700 2008 | initial import [ryanb] |
README
= Scope Builder Build up named scopes conditionally. == Install First specify it in your Rails config. config.gem 'ryanb-scope-builder', :lib => 'scope_builder', :source => 'https://gems.github.com' And then install it. rake gems:install Rails 2.1 or later required. == Usage This gem adds the scope_builder method to all Active Record models. A builder behaves exactly like any other named scope except that calling other named scopes on it will alter the builder itself rather than returning a new named scope. builder = Product.scope_builder builder.released.visible # call a couple named scopes to change builder builder.cheap if only_show_cheap_products? # build scopes conditionally The scope_builder method can also take a block which will return the builder. This is useful when you are using the builder in a model search method. # in product model def self.search(options) scope_builder do |builder| builder.released.visible builder.cheap if options[:cheap] end end The scope_builder method can also be called on an existing scope. products = Product.released.visible builder = products.scope_builder builder.cheap if only_show_cheap_products? == Development This project can be found on github at the following URL. https://github.com/ryanb/scope-builder/ If you would like to contribute to this project, please fork the repository and send me a pull request.
This feature is coming soon. Sit tight!