WIP support activerecord4.0 or later