joelmoss/bitmask_attributes — pull request #18 by tight (2012-07-05 08:33:22+00:00)
Title: Single Table inheritance

Hello,

Here's a small patch to handle single table inhertitance.

```ruby
class User < ActiveRecord::Base
bitmask :bm, as: [:foo, :bar, :baz]
end

class Admin < User
end

a = Admin.new
a.bm = [:foo, :bar] # was raising NoMethodError before
```

Bitmasks are now stored in the base class (`User` here), and subclasses (`Admin`) use base class to retrieive bitmasks definitions.
This also means that bitmask defined in subclass will be available to other classes (just didn't know what to do in this particular case, since this is STI and columns are "shared" ...)