Refactor away deprecation warning for Rails 4

This just removes a deprecation warning when used in Rails 4.