# REST and special URLs

**URL:** <https://www.ruby-forum.com/t/rest-and-special-urls/105230>\
**Category:** Rails\
**Created:** [May 27, 2007, 6:12pm UTC](https://www.ruby-forum.com/t/rest-and-special-urls/105230 "2007-05-27T18:12:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tarscher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Post date:** [May 27, 2007, 6:12pm UTC](https://www.ruby-forum.com/t/rest-and-special-urls/105230/1 "2007-05-27T18:12:32Z")

</div>

Hi all,

I want to start using some REST in my design. I have build a restfull  
controller and try to link to it in my view. The problem is that my  
URLs all have something extra added (a session value). When I use the  
restfull link (eg: new\_user\_url) it links to [site.com/user/new](http://site.com/user/new) but it  
should actualy be [site.com/added\_string/user/new](http://site.com/added_string/user/new) .

How can I add that string (from session) to the url?

Thanks  
Stijn

---

<div class="post-metadata">

**Author:** ![Tarscher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Post date:** [May 27, 2007, 9:33pm UTC](https://www.ruby-forum.com/t/rest-and-special-urls/105230/2 "2007-05-27T21:33:53Z")

</div>

On 5/27/07, Tarscher [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks  
> Stijn

Try setting a path\_prefix to something like ‘:token’ on your routes.

–  
Rick O.  
[http://lighthouseapp.com](http://lighthouseapp.com)  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)

---

<div class="post-metadata">

**Author:** ![Tarscher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Post date:** [May 28, 2007, 4:44am UTC](https://www.ruby-forum.com/t/rest-and-special-urls/105230/3 "2007-05-28T04:44:57Z")

</div>

Tarscher wrote:

> Hi all,
> 
> I want to start using some REST in my design. I have build a restfull  
> controller and try to link to it in my view. The problem is that my  
> URLs all have something extra added (a session value). When I use the  
> restfull link (eg: new\_user\_url) it links to [site.com/user/new](http://site.com/user/new) but it  
> should actualy be [site.com/added\_string/user/new](http://site.com/added_string/user/new) .
> 
> How can I add that string (from session) to the url?
> 
> Thanks  
> Stijn

suggest you that reference the Beast source code. 🙂
