Rails 4 upgrade - by James Kiesel and Rob Guthrie