# Stop id from showing in the address bar

**URL:** <https://www.ruby-forum.com/t/stop-id-from-showing-in-the-address-bar/146229>\
**Category:** Rails\
**Created:** [August 19, 2008, 9:28am UTC](https://www.ruby-forum.com/t/stop-id-from-showing-in-the-address-bar/146229 "2008-08-19T09:28:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vidya1111](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b3f665/32.png) [@vidya1111](https://www.ruby-forum.com/u/vidya1111)\
**Post date:** [August 19, 2008, 9:28am UTC](https://www.ruby-forum.com/t/stop-id-from-showing-in-the-address-bar/146229/1 "2008-08-19T09:28:49Z")

</div>

Hi All,  
I am passing ‘cid’ in the url as:  
[http://test.com:3000/test/do\_test?cid=10](http://test.com:3000/test/do_test?cid=10)

How can I stop the ‘cid’ from showing in the address bar?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![vidya1111](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b3f665/32.png) [@vidya1111](https://www.ruby-forum.com/u/vidya1111)\
**Post date:** [August 19, 2008, 9:56am UTC](https://www.ruby-forum.com/t/stop-id-from-showing-in-the-address-bar/146229/2 "2008-08-19T09:56:57Z")

</div>

On 19 Aug 2008, at 09:28, Vidya Ramachandren wrote:

> I am passing ‘cid’ in the url as:  
> [http://test.com:3000/test/do\_test?cid=10](http://test.com:3000/test/do_test?cid=10)
> 
> How can I stop the ‘cid’ from showing in the address bar?

1. Look at routes.rb in the config/ folder, there’s examples there. If  
you still don’t get it, look up routing in the API.
2. If you really don’t want the ID in there, don’t include it in url,  
but put a hidden field in a form and post it (although i really don’t  
see a point in doing so).
3. Get a book on rails and be enlightened 😉

Best regards

Peter De Berdt
