Rails 4.1 enum supported

I've implemented conversion code from enum value to integer.