# Namespaced controllers and helpers

**URL:** <https://www.ruby-forum.com/t/namespaced-controllers-and-helpers/142814>\
**Category:** Rails\
**Created:** [July 11, 2008, 7:20pm UTC](https://www.ruby-forum.com/t/namespaced-controllers-and-helpers/142814 "2008-07-11T19:20:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkoebbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Post date:** [July 11, 2008, 7:20pm UTC](https://www.ruby-forum.com/t/namespaced-controllers-and-helpers/142814/1 "2008-07-11T19:20:00Z")

</div>

Is there something different that has to be done in order to use helper  
modules in namespaced controllers? I have some custom helpers in  
app/helpers/\*\_helper.rb that work great in controllers in  
app/controllers but not in app/controllers/admin

In my application.rb is the line

helper :all

and the namespaced controllers are descended from ApplicationController,  
but when I reference one of the helper methods, I get method undefined  
errors. This is Rails 2.0.2.

Peace,  
Phillip

---

<div class="post-metadata">

**Author:** ![pkoebbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Post date:** [July 11, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/namespaced-controllers-and-helpers/142814/2 "2008-07-11T22:10:06Z")

</div>

Never mind. It was a scope problem. I failed to notice that when I used  
these helpers in other controllers, it was in the context of a render  
:update block, which, I surmise, put it in the context of a view. I was  
trying to use the same helper method as an argument to a method that  
would do the render :update, so the scope was still that of the  
controller.

Phillip
