rails/rails — pull request #18175 by codeodor (2014-12-23 22:00:16+00:00)
Title: Fix route helper to work with string params

This is a redo of #18173, with the change made against the master branch, as requested by @sgrif.

Before Rails 4.2.0, `model_path("id" => 1)` would work fine. As of Rails 4.2.0, it generates a couple of errors:

1. ArgumentError: comparison of Array with Array failed (due to attempting to sort a hash with mixed string/symbol keys)
2. ActionController::UrlGenerationError, because of missing required key :id (i.e., it ignored the "id" string parameter)