what is the most elegant way in ruby to remove a parameter from url?
- by dimus
I would like to take out a parameter from url by it's name without knowing if it is the first, middle or last parameter and reassemble url again. I guess it is not that hard to write something on my own using CGI or URI, but I imagine such functionality exists already. Any suggestions?
in:
http://example.com/path?param1=one¶m2=2¶m3=something3
out:
http://example.com/path?param2=2¶m3=something3