Ruby on Rails
Acts As Bitfield Plugin

Lets you use a bitfield to store boolean values for a record and abstracts away all the horrible messiness of actually having to deal with bitwise logic yourself.

http://gabriel.gironda.org/articles/2005/12/08/bitfields-in-activerecord

See also Plugins

Above link seems to be dead. SVN Repo here:
http://code.helicoid.net/svn/rails/plugins/acts_as_bitfield/

The code to translate SQL conditions doesn’t seem to be get included. Any ideas?