# Map.root question

**URL:** <https://www.ruby-forum.com/t/map-root-question/154233>\
**Category:** Rails\
**Created:** [November 26, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/map-root-question/154233 "2008-11-26T17:00:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [November 26, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/map-root-question/154233/1 "2008-11-26T17:00:44Z")

</div>

Heya,

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 🙂
