# Helper method nav\_path not working

**URL:** <https://www.ruby-forum.com/t/helper-method-nav-path-not-working/89863>\
**Category:** Rails\
**Created:** [March 23, 2007, 12:15pm UTC](https://www.ruby-forum.com/t/helper-method-nav-path-not-working/89863 "2007-03-23T12:15:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christoph\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@Christoph\_O](https://www.ruby-forum.com/u/Christoph_O)\
**Post date:** [March 23, 2007, 12:15pm UTC](https://www.ruby-forum.com/t/helper-method-nav-path-not-working/89863/1 "2007-03-23T12:15:21Z")

</div>

Hi there,

is there any explanation for the following strange behaviour that  
occured to me:  
I created a helper method in application\_helper.rb called “nav\_path”,  
that is supposed to be returning  
an array to me. For some strange reason though, I can’t access this  
method from the partial I am  
calling it from: I simply get nil instead of anything I am really  
returning in the method (I tried a String, too).

As soon as I rename the method to something else, “navpath” i.e., it  
starts working the way it is supposed to.

I could not find anything on “nav\_path” being reserved for Rails or  
something, so this seems to be pretty strange behaviour to me. Any  
explanations?

Greetings,  
Christoph

---

<div class="post-metadata">

**Author:** ![Christoph\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@Christoph\_O](https://www.ruby-forum.com/u/Christoph_O)\
**Post date:** [March 23, 2007, 3:59pm UTC](https://www.ruby-forum.com/t/helper-method-nav-path-not-working/89863/2 "2007-03-23T15:59:58Z")

</div>

> As soon as I rename the method to something else, “navpath” i.e., it  
> starts working the way it is supposed to.

Interesting. It’s probably conflicting with Rails’ named route  
helpers. RESTful routes can end in \_path, and my guess is that Rails  
is intercepting that helper call and trying to give you back the path  
for a resource called ‘nav’.

Jeff

> **[Hey Daddio!](http://softiesonrails.com)**
>
> Home of Hey Daddio Software
