Get rid of Rails 4 deprecation warnings