Skip to content
Browse files

readme

  • Loading branch information...
1 parent 1b1ab18 commit 62514f0a96040aaff839d93fde73bedc4e1e6c51 @nofxx committed Sep 9, 2012
Showing with 5 additions and 21 deletions.
  1. +5 −21 README.rdoc
View
26 README.rdoc
@@ -1,4 +1,4 @@
-= Symbolize attribute values
+= Symbolize (attribute values)
This plugin introduces an easy way to use symbols for values of attributes.
Symbolized attributes return a ruby symbol (or nil) as their value
@@ -35,22 +35,18 @@ On schema DBs, the attribute should be a string (varchar) column.
ActiveRecord:
- class User < ActiveRecord::Base
+ class Contact < ActiveRecord::Base
- symbolize :gender, :in => [:female, :male], :scopes => true
+ symbolize :kind, :in => [:im, :mobile, :email], :scopes => true
- end
Mongoid:
- class User
-
- include Mongoid::Document
+ class Contact
include Mongoid::Symbolize
- symbolize :gender, :in => [:female, :male], :scopes => true
+ symbolize :kind, :in => [:im, :mobile, :email], :scopes => true
- end
Other examples:
@@ -217,15 +213,3 @@ Run the adapter independently:
This fork:
http://github.com/nofxx/symbolize
-
-Forked from:
-http://github.com/nuxlli/activerecord_symbolize
-
-
-Initial work:
-I've been using this for quite some time and made it a rails plugin now. More
-background iinformation can be found at
-http://zargony.com/2007/09/07/symbolize-attribute-values-in-activerecord
-
-
-Copyright (c) 2007-2008 Andreas Neuhaus, released under the MIT license

0 comments on commit 62514f0

Please sign in to comment.
Something went wrong with that request. Please try again.