Monkey patch for Rails 4
Explanation