CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Tue, 19 Aug 2025 08:49:10 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090628103121
location: https://web.archive.org/web/20090628103121/https://github.com/giraffesoft/enum_field/tree/
server-timing: captures_list;dur=0.724014, exclusion.robots;dur=0.030063, exclusion.robots.policy;dur=0.018146, esindex;dur=0.012367, cdx.remote;dur=51.213354, LoadShardBlock;dur=482.343238, PetaboxLoader3.datanode;dur=208.296892, PetaboxLoader3.resolve;dur=141.242846
x-app-server: wwwb-app202
x-ts: 302
x-tr: 575
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: Tue, 19 Aug 2025 08:49:11 GMT
content-type: text/html; charset=utf-8
content-length: 118
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Sun, 28 Jun 2009 10:31:20 GMT
x-archive-orig-connection: close
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090628103121/https://github.com/giraffesoft/enum_field/tree/master
x-archive-orig-x-runtime: 126ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 118
cache-control: max-age=1800
memento-datetime: Sun, 28 Jun 2009 10:31:21 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Wed, 18 Mar 2009 02:38:16 GMT", ; rel="prev memento"; datetime="Tue, 19 May 2009 06:06:59 GMT", ; rel="memento"; datetime="Sun, 28 Jun 2009 10:31:21 GMT", ; rel="next memento"; datetime="Thu, 23 Jul 2009 06:34:07 GMT", ; rel="last memento"; datetime="Tue, 22 Sep 2009 00:15:38 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_20090628050650_crawl101-c/52_10_20090628103003_crawl101.arc.gz
server-timing: captures_list;dur=0.556904, exclusion.robots;dur=0.023326, exclusion.robots.policy;dur=0.014215, esindex;dur=0.010395, cdx.remote;dur=12.043150, LoadShardBlock;dur=199.297997, PetaboxLoader3.datanode;dur=167.877462, PetaboxLoader3.resolve;dur=187.973243, load_resource;dur=167.502039
x-app-server: wwwb-app202
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 200
server: nginx
date: Tue, 19 Aug 2025 08:49:11 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Sun, 28 Jun 2009 10:31:20 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 145ms
x-archive-orig-etag: "48b1bbb0fcd7a6f960638c30afe770a9"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 24407
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 28 Jun 2009 10:31:21 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sun, 01 Mar 2009 01:29:12 GMT", ; rel="prev memento"; datetime="Fri, 26 Jun 2009 15:41:57 GMT", ; rel="memento"; datetime="Sun, 28 Jun 2009 10:31:21 GMT", ; rel="next memento"; datetime="Thu, 23 Jul 2009 06:34:07 GMT", ; rel="last memento"; datetime="Thu, 03 Sep 2009 06:44:29 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_20090628050650_crawl101-c/52_10_20090628103003_crawl101.arc.gz
server-timing: captures_list;dur=0.747592, exclusion.robots;dur=0.034307, exclusion.robots.policy;dur=0.020933, esindex;dur=0.013543, cdx.remote;dur=8.260010, LoadShardBlock;dur=163.947813, PetaboxLoader3.datanode;dur=119.066874, PetaboxLoader3.resolve;dur=154.420946, load_resource;dur=117.962185
x-app-server: wwwb-app202
x-ts: 200
x-tr: 356
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=()
content-encoding: gzip
giraffesoft's enum_field 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 (

Run the following if you haven't already:
gem sources -a https://gems.github.com
Install the gem(s):
sudo gem install giraffesoft-enum_field
Description: | edit |
Homepage: | edit |
Public Clone URL: |
git://github.com/giraffesoft/enum_field.git
Give this clone URL to anyone.
git clone git://github.com/giraffesoft/enum_field.git
|
Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:giraffesoft/enum_field.git
|
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Mon Feb 09 16:51:41 -0800 2009 | Ignore a few basic things [webmat] |
![]() |
MIT-LICENSE | Loading commit data... ![]() |
|
![]() |
README.rdoc | ||
![]() |
Rakefile | ||
![]() |
VERSION.yml | Fri Jun 26 12:19:09 -0700 2009 | Version bump to 0.2.0 [giraffesoft] |
![]() |
enum_field.gemspec | ||
![]() |
init.rb | ||
![]() |
lib/ | ||
![]() |
rails/ | ||
![]() |
test/ |
EnumField
Macro to emulate a MySQL enum_field type thing.
Usage
This plugin encapsulates a validates_inclusion_of and automatically gives you a few more goodies automatically. That’s it!
class Computer < ActiveRecord:Base enum_field :status, ['on', 'off', 'standby', 'sleep', 'out of this world'] # Optionally with a message to replace the default one # enum_field :status, ['on', 'off', 'standby', 'sleep', 'out of this world'], :message => "incorrect status" #... end
This will give you a few things:
- add a validates_inclusion_of with a simple error message ("invalid #{field}") or your custom message
- define the following query methods, in the name of expressive code:
- on?
- off?
- standby?
- sleep?
- out_of_this_world?
- define the STATUSES constant, which contains the acceptable values
License
Copyright © 2008 James Golick, released under the MIT license
This feature is coming soon. Sit tight!