add support for rails4