Trying to fix deprecation notice in Rails 4