Fix further deprecation warnings with respect to Rails 4.