Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Bitmask Field

Bitmask Field

Transparent manipulation of bitmask attributes.

Example

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

Users


See all details


Membership

+ Join this railsplugin

Record Maintainer

'None'