More Rails 4 fixes