Support Rails 3 and up