make it work with rails4