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 but it should actualy be site.com/added_string/user/new . How can I add that string (from session) to the url? Thanks Stijn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 5/27/07, Tarscher <tarscher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 but it > should actualy be site.com/added_string/user/new . > > How can I add that string (from session) to the url? > > Thanks > StijnTry setting a path_prefix to something like '':token'' on your routes. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 but it > should actualy be site.com/added_string/user/new . > > How can I add that string (from session) to the url? > > Thanks > Stijnsuggest you that reference the Beast source code. :) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---