WIP on rails4 compatibility