# Adding and modifying parameters to present url

**URL:** <https://www.ruby-forum.com/t/adding-and-modifying-parameters-to-present-url/121841>\
**Category:** Rails\
**Created:** [December 1, 2007, 7:41pm UTC](https://www.ruby-forum.com/t/adding-and-modifying-parameters-to-present-url/121841 "2007-12-01T19:41:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 1, 2007, 7:41pm UTC](https://www.ruby-forum.com/t/adding-and-modifying-parameters-to-present-url/121841/1 "2007-12-01T19:41:57Z")

</div>

Hello,

I’m having problems creating a new link that points to the same  
action, with the same existing params, but that would also add a param  
or modify an existing one.

For example, I have:

[http://www.mysite.com/search/results?string=ruby](http://www.mysite.com/search/results?string=ruby)

I’d like to be able to create a new link that adds a new param:

[http://www.mysite.com/search/results?string=ruby&page=2](http://www.mysite.com/search/results?string=ruby&page=2)

Then modify an existing param:

[http://www.mysite.com/search/results?string=ruby&page=3](http://www.mysite.com/search/results?string=ruby&page=3)

Any help would be appreciated.

Thank you

Olivier D.
