# Adding a default to link\_to

**URL:** <https://www.ruby-forum.com/t/adding-a-default-to-link-to/128853>\
**Category:** Rails\
**Created:** [February 12, 2008, 5:18am UTC](https://www.ruby-forum.com/t/adding-a-default-to-link-to/128853 "2008-02-12T05:18:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![galeal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@galeal](https://www.ruby-forum.com/u/galeal)\
**Post date:** [February 12, 2008, 5:18am UTC](https://www.ruby-forum.com/t/adding-a-default-to-link-to/128853/1 "2008-02-12T05:18:19Z")

</div>

I have urls like

/:service/:controller/:action/:id

is it possible for link\_to to preserve the current :service from the  
query string when using a link\_to, I don’t really want to troll through  
my code manually replacing inserting this. Surely there’s a rails way.

TIA
