Fix broken handling of Rails 3.2