I am using URI.encode to encode url's in my rail's application. But sometimes these url's can be already encoded and I do not want to encode them again. I can see one solution here: How to find out if string has already been URL encoded?
However, was wondering is there any API already available in ruby for doing this ?
Also as suggested in https://stackoverflow.com/a/2295286/1475737 is decoding the string and checking its length with original a correct solution ?
Appreciate any suggestions!