WIP towards rails4 compatibility