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
How would you solve the problem? Any idea, suggestion…
bye
Thanks