Rails4

Now working on rails4.