Browse the Ruby on Rails Community.

You are here: Browse Projects acts_as_bytefield

acts_as_bytefield


Location: United States, Overland Park, KS


We needed a convenient way to store a series of values in a single field. A bitfield would not do because it would only allow a value of 1 or 0 for each field, and we wanted to be able to store at least 3 values for each field.

So I found Gabriel Gironda’s acts_as_bitfield plugin and made a few tweaks. ActsAsBytefield is the result. It allows storage of 256 values in each field, or 255 discrete values ranging from 0-255 (unsigned char or byte) for each value in a MySQL varchar(255) field.


Homepage: http://blog.cbciweb.com/articles/2007/04/23/acts-as-bytefield-activerecord-bytefield-plugin