Support Rails 4 and Rails 3.