make it compatible with Rails 3.2