upgrade to support rails4.1