Adds upgrades for Rails 4 compatibility