You are here: Browse Railsplugins Bitmask Field
Transparent manipulation of bitmask attributes.
class User < ActiveRecord::Base
bitmask :roles, :as => [:writer, :publisher, :editor]
end
user = User.create(:name => "Bruce", :roles => [:publisher, :editor])
user.roles
=> [:publisher, :editor]
user.roles << :writer
user.roles
=> [:publisher, :editor, :writer]
Copyright© 2007 Bruce Williams <bruce>, released under the MIT license
NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly