]> git.openstreetmap.org Git - rails.git/blob - config/initializers/router.rb
Merge remote-tracking branch 'upstream/master' into routing
[rails.git] / config / initializers / router.rb
1 # Some versions of ruby seem to accidentally force the encoding
2 # as part of normalize_path and some don't
3
4 module ActionDispatch
5   module Journey
6     class Router
7       class Utils
8         def self.normalize_path_with_encoding(path)
9           self.normalize_path_without_encoding(path).force_encoding("UTF-8")
10         end
11
12         class << self
13           alias_method_chain :normalize_path, :encoding
14         end
15       end
16     end
17   end
18 end