change to adapt rails4