Get rid of deprecation warnings in Rails 4.