Fixing Rails 4 deprecation warning
Successfully tested in Rails 4.0.0.beta