what is the most elegant way in ruby to remove a parameter from url?

Posted by dimus on Stack Overflow See other posts from Stack Overflow or by dimus
Published on 2010-01-27T19:15:01Z Indexed on 2010/05/10 19:54 UTC
Read the original article Hit count: 181

Filed under:
|
|

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&param2=2&param3=something3

out:

http://example.com/path?param2=2&param3=something3

© Stack Overflow or respective owner

Related posts about ruby

Related posts about url