Changes to make things work in Rails 4.