fix rails4 enums attribute issue

I am not sure how to make a test for this. It should be AR 4 only test. As far as I see the current tests are run against 1 version of AR only.