Adding support for rails4