Rails 4.x compatibility