Fixed deprecation warning that occurs in Rails 4.0