Upgrading to support rails 4.x