Initial changes for Rails 4 upgrade.