joelmoss/bitmask_attributes — pull request #9 by spemmons (2012-03-21 16:47:28+00:00)
Title: use declarative rather than inferred support for null values to simplify SQL conditions

my previous implementation of the null value handling relied on inferring the actual schema definition of the column to determine if the value actually allows nulls or not

unfortunately, doing so tripped over the same problem seen recently with the "validate_for" method

i really see only 2 solutions: 1) be able to defer "install_on" behavior until AFTER the migrations and/or schema load or 2) AVOID relying on the underlying schema load for generating code (e.g., scopes)

as a result, i chose #2 as the simplest path where the handling of nulls is explicitly declared on the "bitmask" definition

since this was "my idea" i figured the change would only affect me, and as a result, didn't justify a more extensive change that #1 would require

cheers! -SE-