works with rails4.*