Re:100 more of those BITFIELDs
by andrewfromx on Friday February 26, 2016 @11:21AM
(#11182193)
in rails I add:
which lets me access each col like normal. blah.has_foo_boolean1 or blah.has_foo_boolean1=true etc.
[ Parent
| on HN ]
You might want to take a look at https://github.com/pboling/flag_shih_tzu, which does all of that and a lot more, like adding database scopes.
Re:100 more of those BITFIELDs
by andrewfromx on Friday February 26, 2016 @12:18PM
(#11182578)
reminds me of this http://jeremykun.com/2013/02/08/why-there-is-no-hitchhikers-... article about doing Math cuz u love it.
Re:100 more of those BITFIELDs
by andrewfromx on Friday February 26, 2016 @12:17PM
(#11182573)
aw, but it was so much fun writing that logic myself and really learning how bit ops work in ruby.