http://github.com/zzurang/marshalable_set_attribute
a ruby module that lets an attribute act as a set and persists with AR
class Foo < ActiveRecord::Base include MarshalableSetAttribute attr_accessor :permissions marshalable_set_attribute :permissions end foo = Foo.create! set = foo.permissions_set set.add(Permission::READ) set.add(Permission::WRITE) set.delete(Permission::READ) set.save!
1. Support multiple attributes with attr_accessors [:old_emails, :roles]