# Rails3 question about why using the older style :controller option breaks under the following scenar

**URL:** <https://www.ruby-forum.com/t/rails3-question-about-why-using-the-older-style-controller-option-breaks-under-the-following-scenar/195431>\
**Category:** Rails\
**Created:** [September 23, 2010, 7:13am UTC](https://www.ruby-forum.com/t/rails3-question-about-why-using-the-older-style-controller-option-breaks-under-the-following-scenar/195431 "2010-09-23T07:13:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/71c47a/32.png) [@Rick\_R](https://www.ruby-forum.com/u/Rick_R)\
**Post date:** [September 23, 2010, 7:13am UTC](https://www.ruby-forum.com/t/rails3-question-about-why-using-the-older-style-controller-option-breaks-under-the-following-scenar/195431/1 "2010-09-23T07:13:29Z")

</div>

I’ll probably do a bad job at describing this but I’m going to give it  
a shot (pretty new to Rails)…

In my main application layout file I have the following link in my  
menu bar which works just fine:

\<%= link\_to “Meters”, meters\_path %\>

I originally had it as the following, since I had copied from some  
older rails2 project:

\<%= link\_to “Meters”, :controller =\> ‘meters’ %\>

This latter link is working fine on most pages BUT when I implemented  
Devise into my application and I tried to go the ‘edit user’ screen  
which goes to the user/edit view, I end up with the edit user page not  
displaying due to the following error:

No route matches {:controller=\>“devise/meters”}

It’s not really a problem since using the newer restful approach of  
\<%= link\_to “Meters”, meters\_path %\> has things working, but I’m just  
trying to understand Rails better and why using the older \<%= link\_to  
“Meters”, :controller =\> ‘meters’ %\> no longer works correctly on the  
User pages (it’s fine on the other pages.)

I’m guessing it has something to do with the fact that the user edit  
form is mapped to {:action=\>“edit”,  
:controller=\>“devise/registrations”} and maybe that somehow forces the  
whole context of the page to think it’s ‘under’ devise directory?  
Being new, I’m a bit confused what’s going on so any help appreciated.

–  
Rick R
