support ActiveRecord enum in rails 4.x

This is a quick patch trying to solve issue #102, hope it pass the ci this time:)