Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed Sep 9, 2012
1 parent 1b1ab18 commit 62514f0
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions README.rdoc
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
= Symbolize attribute values = Symbolize (attribute values)


This plugin introduces an easy way to use symbols for values of attributes. This plugin introduces an easy way to use symbols for values of attributes.
Symbolized attributes return a ruby symbol (or nil) as their value Symbolized attributes return a ruby symbol (or nil) as their value
Expand Down Expand Up @@ -35,22 +35,18 @@ On schema DBs, the attribute should be a string (varchar) column.


ActiveRecord: 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: Mongoid:


class User class Contact

include Mongoid::Document
include Mongoid::Symbolize include Mongoid::Symbolize


symbolize :gender, :in => [:female, :male], :scopes => true symbolize :kind, :in => [:im, :mobile, :email], :scopes => true


end


Other examples: Other examples:


Expand Down Expand Up @@ -217,15 +213,3 @@ Run the adapter independently:
This fork: This fork:
http://github.com/nofxx/symbolize 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.