Fix Rails 4 deprecated warning