Fix tests. Support Rails 4.1