Revert "fix another deprecation for rails 4"

This reverts commit b1971e6fbbf1b512c0b8d6462cafa50c9367ea0c.
more fixes for deprecations