# Home\_path?

**URL:** <https://www.ruby-forum.com/t/home-path/115845>\
**Category:** Rails\
**Created:** [September 29, 2007, 3:19am UTC](https://www.ruby-forum.com/t/home-path/115845 "2007-09-29T03:19:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jables](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@Jables](https://www.ruby-forum.com/u/Jables)\
**Post date:** [September 29, 2007, 3:19am UTC](https://www.ruby-forum.com/t/home-path/115845/1 "2007-09-29T03:19:55Z")

</div>

I’m trying to run some code that uses a link\_to and home\_path as the  
location. It returns a undeclared local variable. Is home\_path only  
available in edge rails or what is this?

---

<div class="post-metadata">

**Author:** ![Jables](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@Jables](https://www.ruby-forum.com/u/Jables)\
**Post date:** [September 29, 2007, 8:00am UTC](https://www.ruby-forum.com/t/home-path/115845/2 "2007-09-29T08:00:37Z")

</div>

FYI, I figured this out and if you are interested home\_path (or  
anything\_path) is defined in routes.rb by defining it like so:  
map.home ‘’, :controller =\> ‘controller’, :action =\> ‘action’  
then you can us home\_path as a local variable.
