Support for edge rails enum fields.

This change makes it possible to use integer field declared as Rails 4.1+ enum  to store state.
Seems to be fully backwards compatible.