Hacks for Rails 4