# Redirecting to home page

**URL:** <https://www.ruby-forum.com/t/redirecting-to-home-page/178978>\
**Category:** Rails\
**Created:** [November 14, 2009, 5:28pm UTC](https://www.ruby-forum.com/t/redirecting-to-home-page/178978 "2009-11-14T17:28:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iggybaseball](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ed8c4c/32.png) [@iggybaseball](https://www.ruby-forum.com/u/iggybaseball)\
**Post date:** [November 14, 2009, 5:28pm UTC](https://www.ruby-forum.com/t/redirecting-to-home-page/178978/1 "2009-11-14T17:28:44Z")

</div>

I have just created a simple blog application and I have one question. I  
designed a method and a view to show the latest three blogs in my  
database. This looks great if you go to the page, but now I want to  
redirect it so that when someone visits my homepage:

eg.  
[www.ruby-forum.com](http://www.ruby-forum.com) =\> They get the page I created. How do I get it use  
the method I created and the view? I would also prefer to not have to  
direct it somewhere like :

[www.ruby-forum.com/home](http://www.ruby-forum.com/home)

Thanks!

---

<div class="post-metadata">

**Author:** ![iggybaseball](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ed8c4c/32.png) [@iggybaseball](https://www.ruby-forum.com/u/iggybaseball)\
**Post date:** [November 14, 2009, 8:05pm UTC](https://www.ruby-forum.com/t/redirecting-to-home-page/178978/2 "2009-11-14T20:05:13Z")

</div>

Laim B. wrote:

> I have just created a simple blog application and I have one question. I  
> designed a method and a view to show the latest three blogs in my  
> database. This looks great if you go to the page, but now I want to  
> redirect it so that when someone visits my homepage:
> 
> eg.  
> [www.ruby-forum.com](http://www.ruby-forum.com) =\> They get the page I created. How do I get it use  
> the method I created and the view? I would also prefer to not have to  
> direct it somewhere like :
> 
> [www.ruby-forum.com/home](http://www.ruby-forum.com/home)

Read the routing docs. What you want is probably map.root.

> Thanks!

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
