Correction to remove deprecation with Rails 4