jeffp / enumerated_attribute

Easy enum for your models, objects and views
MIT License
190 stars 63 forks source link

Allow using annotate with multiple enumerated_attributes #65

Open rchekaluk opened 10 years ago

rchekaluk commented 10 years ago

Fixes https://github.com/jeffp/enumerated_attribute/issues/56

This is difficult to provide a RSpec test for (I tried), but the fix does work and permits running annotate against models that contain multiple enumerated_attributes.

This fix was inspired by https://github.com/jeffp/meta_programming/blob/master/lib/meta_programming/object.rb#L42