Forum: Ruby on Rails map.root question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Heinz S. (Guest)
on 2008-11-26 18:00

I'm asking myself what the best method is to use map.root.

I have a table called page with various pages in it.

Default is:
map.root :controller => 'pages'
...would take me to the index. I don't want that.
map.root :controller => 'pages', :action => 'show', :id => 1
...would take me to the first page but if the id changes (remove and add
another page as start page) it wouldn't work anymore
map.root :controller => 'pages', :action => 'home'
...would do that what I'm writing in my own action 'home' but is it
really necessary to create an extra action for that?

How do you guys handle that? Any hints and opinions are highly
appreciated :)
This topic is locked and can not be replied to.