Support Rails 4

[ci skip]