I’m developing a site compound by a static part and a dynamic one.
I still use things like “link_to(…)”, etc in the static part within
In the static part, I don’t have the notion of controller and model.
some article about the subject, I got the following situation:
- created a controller, let me call it “static”;
- put my rhtml files under app/views/static/.
Except for the “index” page, all the rest are static pages.
The problem is that I have a lot of static pages to write and it would
confuse to put all them in this directory.
For instance, if I have a menu with several submenus and each submenus
have others subsubmenus, I would like the following structure:
I know I could do something like:
But I would prefer the other much cleaner solution.
I first tried some links like:
link_to => ‘id’ => ‘submenu1’
The link worked as I expected, but after noticing it didn’t work, I
remembered that Rails would try to run the action ‘menu1’ with
the ‘submenu1’ as a parameter, but I’m not using this parameter in this
I would not like to write an action for every view I want in a
What would be the Rails way to achieve what I want?
I want Rails to render all the remaining url after the ‘static’
as the local url after app/views/static.
Let me know if I was not clear. Sorry for the big message, but I
make my question clear enough in a small message.
Thanks in advance,