This is exactly copy from current Rails 3 code. Let’s fix regression (Rails 4 beta will release soon) and think about code fixing later.