Rails 4.2 compatibility