rails/rails — pull request #16410 by calebthompson (2014-08-06 12:33:07+00:00)
Title: Fix undefined method to_query for Hash

When cherry-picking `active_support/core_ext/object/to_param` in 4.1.*,
we still see an undefined method to_query for hash unless we also pull
in `.../to_query`.

This was resolved on master in c420a8da, so this is exclusively a
backport based on the Active Support Core Extensions guide's
[Cherry-picking a Definition] section.

[Cherry-picking a Definition]: http://guides.rubyonrails.org/active_support_core_extensions.html#cherry-picking-a-definition