Last active
November 11, 2015 22:44
-
-
Save itsmikeq/d422afbfc4c6f74d957e to your computer and use it in GitHub Desktop.
fix %2F's in rails > 4.1.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix routes with /'s that are switched to %2F in > rails 4.1.1 | |
# put in config/initializers/ | |
module ActionDispatch | |
module Journey | |
class Router | |
class Utils | |
class UriEncoder | |
def escape_segment(segment) | |
# dont jack up URLs and turn the /'s into %2F's | |
URI.decode(escape(segment, SEGMENT)) | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment