My website, user side, is just one controller/action I reroute this: http://www.mywebsite.com/:menu/:submenu to this: http://www.mywebsite.com/MyController/Index/:menu/:submenu so that the visitors have a nice web url like this: www.mywebsite.com/about_us/my_story all menu and submenu is dynamically generate from a database, the whole website is actually contained in the database...> the problem is that I don''t know how to use the link_to helper in this situation<%= link_to menu.name, {:controller => ''mycontroller'', :action => ''index'', :menu => menu.name} %> results in: http://www.mywebsite.com/myController?menu=about_us_us which works but sucks> I could do this, but I have to create a @site variable and set it everytime<a href="<%= @site + menu.name %>"><%= menu.name %></a> How would you solve the problem? Any idea, suggestion... bye Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Kumar.1524v-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Sep-05 03:09 UTC
Re: link_to flexibility
<a href="http://www.mywebsite.com/myController?menu=about_us_us "><%menu.name %></a> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---