Bit Vector Preferences
Posted by Jim Morris on Tue Aug 07 23:53:09 -0700 2007
In my latest web project I potentially have a lot of boolean preferences, which I use for enabling or disabling various email notifications to users.
Rather than having to add a migration everytime I want to add a new
preference, I thought I would use the composed_of
feature in my model
and compose the boolean preferences from a bitvector. That way I can
simply modify my model to add new preferences rather than add new
columns to the database.