Upgraded to work with Rails ~> 4.0