Hacks for Rails 3.2.