Compatible with Rails 3.1