rails/rails — pull request #9368 by beedub (2013-02-22 00:00:23+00:00)
Title: PR #5219 backported to 3-2

This is the 3-2 patch that mimics https://github.com/rails/rails/pull/5219.