Skip to content

Instantly share code, notes, and snippets.

View jesscanady's full-sized avatar

Jessica Canady jesscanady

View GitHub Profile
@jesscanady
jesscanady / gist:1278850
Created October 11, 2011 17:58
Completely untested legacy bitfield-based role system fixer.
alias_attribute :administrator :IsAdministrator
alias_attribute :consumer :IsConsumer
# etc...
# now you can do checks like:
if @user.administrator?
# and if you need .role: